]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
stl_bvector.h (vector<bool>::vector()): Add noexcept.
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f0889939
AM
12015-06-25 Andrew MacLeod <amacleod@redhat.com>
2
3 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
4 * c-parser.c: Likewise.
5
8d67ee55
RS
62015-06-25 Richard Sandiford <richard.sandiford@arm.com>
7
8 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
9 instead of pointer_hash.
10 (detect_field_duplicates): Likewise.
11
0ae9bd27
MP
122015-06-25 Marek Polacek <polacek@redhat.com>
13
14 * c-array-notation.c: Use VAR_P throughout.
15 * c-decl.c: Likewise.
16 * c-objc-common.c: Likewise.
17 * c-parser.c: Likewise.
18 * c-typeck.c: Likewise.
19
62f9079a
MP
202015-06-25 Marek Polacek <polacek@redhat.com>
21
22 * c-decl.c: Use is_global_var throughout.
23 * c-parser.c: Likewise.
24 * c-typeck.c: Likewise.
25
abb226c9
AM
262015-06-17 Andrew MacLeod <amacleod@redhat.com>
27
28 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
29 * c-aux-info.c: Likewise.
30 * c-convert.c: Likewise.
31 * c-decl.c: Likewise.
32 * c-errors.c: Likewise.
33 * c-lang.c: Likewise.
34 * c-objc-common.c: Likewise.
35 * c-parser.c: Likewise.
36 * c-typeck.c: Likewise.
37
8cbababc
JH
382015-06-11 Jan Hubicka <hubicka@ucw.cz>
39
40 PR middle-end/66325
41 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
42 variants.
43
a0349665
PMR
442015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
45
46 * c-decl.c (pop_scope): Register the main translation unit
47 through the new debug hook.
48
13fdf2e2
AM
492015-06-08 Andrew MacLeod <amacleod@redhat.com>
50
51 * c-array-notation.c : Adjust include files.
52 * c-aux-info.c : Likewise.
53 * c-convert.c : Likewise.
54 * c-decl.c : Likewise.
55 * c-errors.c : Likewise.
56 * c-lang.c : Likewise.
57 * c-lang.h : Likewise.
58 * c-objc-common.c : Likewise.
59 * c-parser.c : Likewise.
60 * c-typeck.c : Likewise.
61
d7438551
AH
622015-06-05 Aldy Hernandez <aldyh@redhat.com>
63
64 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
65 immediately clobber it.
66 (c_write_global_declarations_1): Remove call to
67 check_global_declaration_1.
68 (c_write_global_declarations_2): Remove.
69 (c_write_final_cleanups): Rename from c_write_global_declarations.
70 Remove call to finalize_compilation_unit.
71 Remove calls to debugging hooks.
72 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
73 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
74 * c-tree.h: Remove c_write_global_declarations.
75
ecb9f223
AM
762015-06-04 Andrew MacLeod <amacleod@redhat.com>
77
78 * c-array-notation.c: Adjust includes for restructured coretypes.h.
79 * c-aux-info.c: Likewise.
80 * c-convert.c: Likewise.
81 * c-decl.c: Likewise.
82 * c-errors.c: Likewise.
83 * c-lang.c: Likewise.
84 * c-objc-common.c: Likewise.
85 * c-parser.c: Likewise.
86 * c-typeck.c: Likewise.
87
9482b620
MP
882015-06-04 Marek Polacek <polacek@redhat.com>
89
90 PR c/66341
91 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
92 it is a lvalue.
93
bc51ace3
PK
942015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
95
96 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
97 Warn for empty struct.
98 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
99
ea5b45b6
AT
1002015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
101
102 * c-decl.c (start_function): Call plugin before parsing.
103 (finish_function): Call plugin after parsing.
104
c2d47482
PK
1052015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
106
107 PR c/49551
108 * c-decl.c (merge_decls): Merge DECL_COMMON.
109
a95492ab
JW
1102015-05-22 Jim Wilson <jim.wilson@linaro.org>
111
112 * Make-lang.in (check_gcc_pallelize): Define.
113
fd5c817a
MP
1142015-05-22 Marek Polacek <polacek@redhat.com>
115
116 PR c/47043
117 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
118 attributes.
119
c7b70a3c
MP
1202015-05-21 Marek Polacek <polacek@redhat.com>
121
122 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
123 DECL_BUILT_IN.
124
21b634ae
MP
1252015-05-20 Marek Polacek <polacek@redhat.com>
126
127 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
128 * c-typeck.c: Likewise.
129
296a8c2f
MP
1302015-05-19 Marek Polacek <polacek@redhat.com>
131
132 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
133
41b37d5e
JJ
1342015-05-19 Jakub Jelinek <jakub@redhat.com>
135
136 PR middle-end/66199
137 * c-parser.c (c_parser_omp_for_loop): Don't add
138 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
139 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
140 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
141 constructs.
142
fab27f52
MM
1432015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
144
145 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 146 swaps.
fab27f52 147
40de31cf
MLI
1482015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
149
150 PR fortran/44054
151 * c-objc-common.c (c_tree_printer): Replace locus pointer with
152 accessor function.
153
3aa3c9fc
MP
1542015-05-14 Marek Polacek <polacek@redhat.com>
155
156 PR c/66066
157 PR c/66127
158 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
159 rather than with 0.
160
c3388e62
DM
1612015-05-12 David Malcolm <dmalcolm@redhat.com>
162
163 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
164 to add a call to warn_for_misleading_indentation.
165 (c_parser_else_body): Likewise, adding param "else_loc".
166 (c_parser_if_statement): Check for misleading indentation.
167 (c_parser_while_statement): Likewise.
168 (c_parser_for_statement): Likewise.
169
755e528f
MP
1702015-05-08 Marek Polacek <polacek@redhat.com>
171
172 PR c/64918
173 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
174 (output_init_element): Likewise.
175
0173bd2a
MP
1762015-05-07 Marek Polacek <polacek@redhat.com>
177
178 PR c/65179
179 * c-typeck.c (build_binary_op): Warn when left shifting a negative
180 value.
181
9babc352
MP
1822015-04-30 Marek Polacek <polacek@redhat.com>
183
184 * c-typeck.c (set_init_label): Call error_at instead of error and
185 pass LOC to it.
186
ac9f18db
MP
187 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
188 the type of a decl.
189
ec3fba51
MP
190 * c-typeck.c (c_build_va_arg): Clarify the error message.
191
b811915d
TS
1922015-04-29 Thomas Schwinge <thomas@codesourcery.com>
193
194 * c-parser.c (c_parser_oacc_enter_exit_data): Use
195 OMP_STANDALONE_CLAUSES.
196
f3075008
MP
1972015-04-28 Marek Polacek <polacek@redhat.com>
198
199 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
200
4e81b788
MP
2012015-04-28 Marek Polacek <polacek@redhat.com>
202
203 PR c/65901
204 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
205
6c1db78e
MP
2062015-04-25 Marek Polacek <polacek@redhat.com>
207
208 PR c/52085
209 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
210 attribute.
211
5c4abbb8
MP
2122015-04-23 Marek Polacek <polacek@redhat.com>
213
214 PR c/65345
215 * c-decl.c (set_labels_context_r): New function.
216 (store_parm_decls): Call it via walk_tree_without_duplicates.
217 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
218 instead of create_tmp_var. Build TARGET_EXPR instead of
219 COMPOUND_EXPR.
220 (build_atomic_assign): Use create_tmp_var_raw instead of
221 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
222
06aca1d5
IV
2232015-04-20 Ilya Verbin <ilya.verbin@intel.com>
224
225 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
226 (c_parser_omp_target_update): Add missed %> to error_at ().
227
8fba1830
BRF
2282015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
229
230 PR target/55143
231 * c-decl.c (c_default_pointer_mode): Remove definition.
232 * c-tree.h (c_default_pointer_mode): Remove declaration.
233
62021f64
TB
2342015-03-27 Tobias Burnus <burnus@net-b.de>
235
236 PR c/65586
237 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
238 error out.
239 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
240 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
241 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
242
9b65e171
JJ
2432015-03-19 Jakub Jelinek <jakub@redhat.com>
244
245 * c-decl.c (c_decl_attributes): Also add "omp declare target"
246 attribute for DECL_EXTERNAL VAR_DECLs.
247
17958621
JJ
2482015-03-11 Jakub Jelinek <jakub@redhat.com>
249
250 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
251 argument.
252
7ccb1a11
JJ
2532015-03-10 Jakub Jelinek <jakub@redhat.com>
254
255 PR c/65120
256 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
257 before preparing arguments to warn_logical_not_parentheses.
258
01177669
JJ
2592015-03-09 Jakub Jelinek <jakub@redhat.com>
260
261 PR c/65120
262 * c-typeck.c (parser_build_binary_op): Don't warn for
263 !!x == y or !b == y where b is _Bool.
264
802ac282
MP
2652015-03-09 Marek Polacek <polacek@redhat.com>
266
267 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
268 * c-decl.c (grokdeclarator): Likewise.
269 * c-typeck.c (build_binary_op): Likewise.
270
e5165b60
MP
2712015-02-27 Marek Polacek <polacek@redhat.com>
272
273 PR c/65228
274 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
275
065d214c
MP
2762015-02-14 Marek Polacek <polacek@redhat.com>
277
278 PR c/64768
279 * c-decl.c (grokdeclarator): Set the range of a flexible array member
280 declared through a typedef name.
281
e5d9235b
MP
2822015-02-13 Marek Polacek <polacek@redhat.com>
283
284 PR c/65050
285 * c-decl.c (grokdeclarator): Print also the type when giving
286 the error message about array's incomplete element type.
287
fa01ffcc
JJ
2882015-02-11 Jakub Jelinek <jakub@redhat.com>
289
290 PR c/64824
291 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
292 check in the POP macro.
293
c3e38a03
MP
2942015-02-09 Marek Polacek <polacek@redhat.com>
295
296 PR c/64856
297 * c-typeck.c (process_init_element): Don't always wrap
298 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
299 initializing a range of elements.
300
4886ec8e
JJ
3012015-02-04 Jakub Jelinek <jakub@redhat.com>
302
303 PR c/64824
304 PR c/64868
305 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
306
c3e38a03 3072015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
308
309 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
310 processing enum declaration.
311
7b33f0c8
MP
3122015-01-29 Marek Polacek <polacek@redhat.com>
313
314 PR c/64709
315 * c-typeck.c (pop_init_level): If constructor_elements has
316 exactly one element with integer_zerop value, set constructor_zeroinit
317 to 1. Remove braces around warning_init call.
318
dea63e49
JJ
3192015-01-27 Jakub Jelinek <jakub@redhat.com>
320
321 PR c/64766
322 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
323 of FUNCTION_DECLs with error_mark_node.
324
d38f7dce
JJ
3252015-01-26 Jakub Jelinek <jakub@redhat.com>
326
327 PR c/64778
328 * c-typeck.c (convert_arguments): Return -1 if there are
329 error_args, even if we've diagnosed too many arguments.
330
cbf5d0e7
RB
3312015-01-21 Richard Biener <rguenther@suse.de>
332
333 PR middle-end/64313
334 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
335 for builtins the user declared correctly.
336
41dbbb37
TS
3372015-01-15 Thomas Schwinge <thomas@codesourcery.com>
338 Bernd Schmidt <bernds@codesourcery.com>
339 Cesar Philippidis <cesar@codesourcery.com>
340 James Norris <jnorris@codesourcery.com>
341 Jakub Jelinek <jakub@redhat.com>
342 Ilmir Usmanov <i.usmanov@samsung.com>
343
344 * c-parser.c: Include "gomp-constants.h".
345 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
346 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
347 Use OMP_CLAUSE_SET_MAP_KIND.
348 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
349 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
350 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
351 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
352 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
353 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
354 "copyout", "create", "delete", "deviceptr", "gang", "host",
355 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
356 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
357 "present_or_create", "pcreate", "seq", "self", "vector",
358 "vector_length", "wait", "worker".
359 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
360 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
361 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
362 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
363 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
364 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
365 (c_parser_oacc_data_clause_deviceptr)
366 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
367 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
368 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
369 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
370 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
371 (c_parser_oacc_parallel, c_parser_oacc_update)
372 (c_parser_oacc_wait): New functions.
373 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
374 (c_finish_oacc_data): New prototypes.
375 * c-typeck.c: Include "gomp-constants.h".
376 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
377 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
378 OMP_CLAUSE_SET_MAP_KIND.
379 (c_finish_oacc_parallel, c_finish_oacc_kernels)
380 (c_finish_oacc_data): New functions.
381 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
382 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
383 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
384 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
385 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
386 GOMP_MAP_FORCE_DEVICEPTR.
387
adfac8df
JJ
3882015-01-09 Michael Collison <michael.collison@linaro.org>
389
390 * c-array-notation.c: Include hash-set.h, machmode.h,
391 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
392 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
393 * c-aux-info.c: Ditto.
394 * c-convert.c: Ditto.
395 * c-decl.c: Ditto.
396 * c-errors.c: Ditto.
397 * c-lang.c: Dittoxs.
398 * c-objc-common.c: Ditto.
399 * c-parser.c: Ditto.
400 * c-typeck.c: Include hash-set.h, machmode.h,
401 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
402 fold-const.h, wide-int.h, inchash.h, real.h and
403 fixed-value.h due to flattening of tree.h.
404
2cc901dc
MP
4052015-01-07 Marek Polacek <polacek@redhat.com>
406
407 PR c/64417
408 * c-typeck.c (process_init_element): Disallow initialization of
409 a flexible array member with a string constant if the structure
410 is in an array.
411
5624e564
JJ
4122015-01-05 Jakub Jelinek <jakub@redhat.com>
413
e5341100
JJ
414 PR sanitizer/64344
415 * c-typeck.c (convert_for_assignment, c_finish_return): For
416 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
417 types also set in_late_binary_op around convert call.
418 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
419 to integral type casts, if not in_late_binary_op, pass c_fully_fold
420 result on expr as last argument to ubsan_instrument_float_cast,
421 if in_late_binary_op, don't use c_save_expr but save_expr.
422
5624e564
JJ
423 Update copyright years.
424
5bd012f8
MP
4252015-01-05 Marek Polacek <polacek@redhat.com>
426
427 PR c/64423
428 * c-typeck.c (build_array_ref): Pass loc down to
429 warn_array_subscript_with_type_char.
430
768952be
MU
4312014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
432
433 * c-typeck.c: New behavious for pointers to arrays with qualifiers
434 (common-pointer-type): For pointers to arrays take qualifiers from
435 element type.
436 (build_conditional_expr): Add warnings for lost qualifiers.
437 (comp-target-types): Allow pointers to arrays with different qualifiers.
438 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
439 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
440 to PEDWARN_FOR_QUALIFIERS.
441
8f94a8c4
JJ
4422014-12-17 Jakub Jelinek <jakub@redhat.com>
443
444 PR sanitizer/64289
445 * c-convert.c: Include ubsan.h.
446 (convert): For real -> integral casts and
447 -fsanitize=float-cast-overflow don't call convert_to_integer, but
448 instead instrument the float cast directly.
449
b731b390
JJ
4502014-11-29 Jakub Jelinek <jakub@redhat.com>
451
452 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
453 c_finish_stmt_expr): Remove NULL last argument from
454 create_tmp_var_raw and create_tmp_var calls.
455 * c-array-notation.c (fix_builtin_array_notation_fn,
456 build_array_notation_expr, fix_conditional_array_notations_1,
457 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
458
541e35a6
MP
4592014-11-28 Marek Polacek <polacek@redhat.com>
460
461 PR c/63862
462 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
463 convert the right operand to integer type.
464
b286be94
MP
4652014-11-25 Marek Polacek <polacek@redhat.com>
466
467 PR c/63877
468 * c-decl.c (start_function): Disable -Wmissing-declarations warning
469 for inline functions.
470
aa7da51a
JJ
4712014-11-21 Jakub Jelinek <jakub@redhat.com>
472
473 PR target/63764
474 * c-typeck.c (build_array_ref): Adjust
475 convert_vector_to_pointer_for_subscript caller. If it returns true,
476 call non_lvalue_loc on the result.
477
d876207f
RB
4782014-11-11 Richard Biener <rguenther@suse.de>
479
480 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
481 to true.
482
e5e44252
AK
4832014-11-10 Andi Kleen <ak@linux.intel.com>
484
485 PR c/60804
486 * c-parser.c (c_parser_statement_after_labels): Call
487 check_no_cilk.
488 (c_parser_if_statement): Dito.
489 (c_parser_switch_statement): Dito.
490 (c_parser_while_statement): Dito.
491 (c_parser_do_statement): Dito.
492 (c_parser_for_statement): Dito.
493 * c-typeck.c (c_finish_loop): Dito.
494
13c21655
PC
4952014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
496
497 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
498 OPT_Wshift_count_overflow in the warnings.
499
2d51fcef
MP
5002014-10-30 Marek Polacek <polacek@redhat.com>
501
502 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
503 print the stripped version as well, if they're not the same.
504
ef4bddc2
RS
5052014-10-29 Richard Sandiford <richard.sandiford@arm.com>
506
507 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
508 machine_mode.
509
c582198b
AM
5102014-10-28 Andrew MacLeod <amacleod@redhat.com>
511
512 * c-decl.c: Adjust include files.
513 * c-parser.c: Ditto.
514
ddc8de03
PM
5152014-10-27 Phil Muldoon <pmuldoon@redhat.com>
516 Tom Tromey <tromey@redhat.com>
517
518 * c-tree.h (enum c_oracle_request): New.
519 (c_binding_oracle_function): New typedef.
520 (c_binding_oracle, c_pushtag, c_bind): Declare.
521 * c-decl.c (c_binding_oracle): New global.
522 (I_SYMBOL_CHECKED): New macro.
523 (i_symbol_binding): New function.
524 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
525 (I_TAG_CHECKED): New macro.
526 (i_tag_binding): New function.
527 (I_TAG_BINDING, I_TAG_DECL): Redefine.
528 (I_LABEL_CHECKED): New macro.
529 (i_label_binding): New function.
530 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
531 (c_print_identifier): Save and restore c_binding_oracle.
532 (c_pushtag, c_bind): New functions.
533
60393bbc
AM
5342014-10-27 Andrew MacLeod <amacleod@redhat.com>
535
536 * c-typeck.c: Adjust include files.
537
d723bb7c
MLI
5382014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
539
540 PR c++/53061
541 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
542 initialization here...
543 (c_initialize_diagnostics): ... but here. Set defaults after
544 building pretty-printer.
545
1bc5a451
MP
5462014-10-23 Marek Polacek <polacek@redhat.com>
547
548 PR c/63626
549 * c-decl.c (pop_scope): Don't print warning in external_scope.
550
4435bb92
MP
5512014-10-19 Marek Polacek <polacek@redhat.com>
552
553 PR c/63567
554 * c-typeck.c (output_init_element): Allow initializing objects with
555 static storage duration with compound literals even in C99 and add
556 pedwarn for it.
557
7278465e
MP
5582014-10-17 Marek Polacek <polacek@redhat.com>
559
560 PR c/63567
561 * c-typeck.c (digest_init): Allow initializing objects with static
562 storage duration with compound literals even in C99 and add pedwarn
563 for it.
564
d9b7be2e
MP
5652014-10-17 Marek Polacek <polacek@redhat.com>
566
567 PR c/63543
568 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
569 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
570 error multiple times. Print the type.
571
f406ae1f
MP
5722014-10-17 Marek Polacek <polacek@redhat.com>
573
574 PR c/63549
575 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
576 type.
577
92574c7c
MP
5782014-10-17 Marek Polacek <polacek@redhat.com>
579
580 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
581 (start_function): Use OPT_Wimplicit_int instead of 0.
582 (store_parm_decls_oldstyle): Likewise.
583
1bc4a978
MT
5842014-10-17 Alan Modra <amodra@gmail.com>
585
586 PR middle-end/61848
587 * c-decl.c (merge_decls): Don't merge section name or tls model
588 to newdecl symtab node, instead merge to olddecl. Override
589 existing olddecl section name. Set tls_model for all thread-local
590 vars, not just OMP thread-private ones. Remove incorrect comment.
591
83685514
AM
5922014-10-16 Andrew MacLeod <amacleod@redhat.com>
593
594 * c-decl.c: Adjust include files.
595
78a7c317
DD
5962014-10-14 DJ Delorie <dj@redhat.com>
597
598 * c-parser.c (c_parse_init): Add RID entries for each __intN.
599 (c_token_starts_typename): Check all __intN, not just __int128.
600 (c_token_starts_declspecs): Likewise.
601 (c_parser_declspecs): Likewise.
602 (c_parser_attribute_any_word): Likewise.
603 (c_parser_objc_selector): Likewise.
604 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
605 (struct c_declspecs): Add int_n_idx field to record *which* __intN
606 is specified.
607 * c-decl.c (declspecs_add_type): Check for all __intN, not just
608 __int128.
609 (finish_declspecs): Likewise.
610
74d98c1e
AB
6112014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
612
613 * c-parser.c (c_parser_all_labels): New function to replace
614 the duplicate code.
615 (c_parser_statement): Call the new function.
616
84937de2
MP
6172014-10-09 Marek Polacek <polacek@redhat.com>
618
619 PR c/63480
620 * c-typeck.c (pop_init_level): Don't warn about initializing
621 with { }.
622
0382aaa0
MP
6232014-10-07 Marek Polacek <polacek@redhat.com>
624
625 PR c/59717
626 * c-decl.c (header_for_builtin_fn): New function.
627 (implicitly_declare): Suggest which header to include.
628
7a0ca710
MP
6292014-10-07 Marek Polacek <polacek@redhat.com>
630
631 * c-convert.c (convert): Use error_operand_p.
632 * c-typeck.c (require_complete_type): Likewise.
633 (really_atomic_lvalue): Likewise.
634 (digest_init): Likewise.
635 (handle_omp_array_sections_1): Likewise.
636
6bc8a126
MP
6372014-10-03 Marek Polacek <polacek@redhat.com>
638
639 PR c/63453
640 * c-decl.c (pop_scope): Don't warn about "inline function declared
641 but never defined" for functions marked with gnu_inline attribute.
642
d90c0a59
JJ
6432014-09-25 Jakub Jelinek <jakub@redhat.com>
644
645 PR c++/63249
646 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
647 on low_bound and length.
648
083e891e
MP
6492014-09-24 Marek Polacek <polacek@redhat.com>
650
651 PR c/61405
652 PR c/53874
653 * c-parser.c: Don't define CPP_KEYWORD.
654 (c_parser_switch_statement): Pass original type to c_finish_case.
655 * c-tree.h (c_finish_case): Update declaration.
656 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
657 conditionally to c_do_switch_warnings.
658
8d95fe25
MP
6592014-09-03 Marek Polacek <polacek@redhat.com>
660
661 PR c/62024
662 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
663 conversions.
664
9a771876
JJ
6652014-09-02 Jakub Jelinek <jakub@redhat.com>
666 Balaji V. Iyer <balaji.v.iyer@intel.com>
667 Igor Zamyatin <igor.zamyatin@intel.com>
668
669 * c-parser.c (c_parser_cilk_for): New function.
670 (c_parser_cilk_grainsize): Likewise.
671 (c_get_temp_regvar): Likewise.
672 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
673 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
674 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
675 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
676 case.
677
b7679d96
CG
6782014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
679
680 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
681 with using HOST_WIDE_INT without truncation to 'int'
682
59ea0364
MP
6832014-08-22 Marek Polacek <polacek@redhat.com>
684
685 PR c++/62199
686 * c-typeck.c (parser_build_binary_op): Adjust call to
687 warn_logical_not_parentheses.
688
671a475e
IZ
6892014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
690
691 PR other/62008
692 * c-parser.c (c_parser_array_notation): Check for correct
693 type of an array added.
694
04159acf
MP
6952014-08-19 Marek Polacek <polacek@redhat.com>
696
697 PR c++/62153
698 * c-typeck.c (build_binary_op): If either operand of a comparison
699 is a boolean expression, call maybe_warn_bool_compare.
700
c77935ee
PP
7012014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
702
703 PR c/45584
704 * c-typeck.c (build_c_cast): Do a conversion even when the
705 TYPE_MAIN_VARIANTs are the same.
706
35aff4fb
MP
7072014-08-19 Marek Polacek <polacek@redhat.com>
708
709 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
710 pedwarn_c99 instead of pedwarn.
711 (grokfield): Likewise.
712 (warn_defaults_to): New function.
713 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
714 Unconditionally call pedwarn_c99 instead of pedwarn.
715 (start_function): Call warn_defaults_to instead of pedwarn_c99.
716 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
717 check flag_isoc11 before.
718 * c-errors.c (pedwarn_c99): Change the return type to bool.
719 Handle -Wc99-c11-compat.
720 * c-parser.c (disable_extension_diagnostics): Handle
721 warn_c99_c11_compat.
722 (restore_extension_diagnostics): Likewise.
723 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
724 instead of pedwarn, don't check flag_isoc11 before.
725 (c_parser_declspecs): Likewise.
726 (c_parser_alignas_specifier): Likewise.
727 (c_parser_alignof_expression): Likewise.
728 (c_parser_generic_selection): Likewise.
729 * c-tree.h (pedwarn_c99): Update declaration.
730 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
731 of pedwarn_c99.
732
177cce46
MP
7332014-08-19 Marek Polacek <polacek@redhat.com>
734
735 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
736 to pedwarn_c90.
737 * c-errors.c: Include "opts.h".
738 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
739 * c-parser.c (disable_extension_diagnostics): Handle negative value
740 of warn_c90_c99_compat, too.
741 (restore_extension_diagnostics): Likewise.
742 (c_parser_compound_statement_nostart): Pass
743 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
744
6dc99c33
MP
7452014-08-12 Marek Polacek <polacek@redhat.com>
746
747 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
748 Add pedwarn.
749 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
750 Likewise.
751 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
752
f3bede71
MP
7532014-08-10 Marek Polacek <polacek@redhat.com>
754
755 PR c/51849
756 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
757 Call pedwarn_c90 instead of pedwarn.
758 (check_bitfield_type_and_width): Likewise.
759 (declspecs_add_qual): Likewise.
760 (declspecs_add_type): Likewise.
761 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
762 Adjust to only call pedwarn_c90.
763 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
764 pedwarn_c90 instead of pedwarn.
765 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
766 * c-parser.c (disable_extension_diagnostics): Handle
767 warn_c90_c99_compat.
768 (restore_extension_diagnostics): Likewise.
769 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
770 pedwarn_c90 instead of pedwarn.
771 (c_parser_initelt): Likewise.
772 (c_parser_postfix_expression): Likewise.
773 (c_parser_postfix_expression_after_paren_type): Likewise.
774 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
775 * c-tree.h: Fix formatting.
776 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
777 pedwarn_c90 instead of pedwarn.
778
9f25a338
TS
7792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
780
781 * c-typeck.c: Remove include of pointer-set.h.
782
044331a8
MP
7832014-08-07 Marek Polacek <polacek@redhat.com>
784
785 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
786
b787e7a2
TS
7872014-08-02 Trevor Saunders <tsaunders@mozilla.com>
788
789 * c-typeck.c: Use hash_map instead of pointer_map.
790
6e2830c3
TS
7912014-08-02 Trevor Saunders <tsaunders@mozilla.com>
792
793 * c-decl.c: Use hash_set instead of pointer_set.
794
a7ee52fb
IZ
7952014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
796
797 PR middle-end/61455
798 * c-array-notation.c (expand_array_notations): Handling
799 of DECL_EXPR added.
800
b4dfdc11
MG
8012014-07-31 Marc Glisse <marc.glisse@inria.fr>
802
803 PR c++/60517
804 * c-typeck.c (c_finish_return): Return 0 instead of the address of
805 a local variable.
806
976d5a22
TT
8072014-07-30 Tom Tromey <tromey@redhat.com>
808
809 * c-typeck.c (struct constructor_stack) <designator_depth>: New
810 field.
811 (really_start_incremental_init, push_init_level): Initialize
812 designator_depth.
813 (pop_init_level): Set global designator_depth.
814 (process_init_element): Check for designated_init attribute.
815
30281de2
MP
8162014-07-20 Marek Polacek <polacek@redhat.com>
817
818 PR c/61852
819 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
820 (implicitly_declare): Pass location to implicit_decl_warning.
821
b108f48f
JJ
8222014-07-14 Jakub Jelinek <jakub@redhat.com>
823
824 PR middle-end/61294
825 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
826 If non-NULL, call c_parser_check_literal_zero.
827 (c_parser_check_literal_zero): New function.
828 (c_parser_postfix_expression_after_primary): Adjust
829 c_parser_expr_list caller, handle -Wmemset-transposed-args.
830
773ec47f
MP
8312014-07-06 Marek Polacek <polacek@redhat.com>
832
833 PR c/6940
834 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
835 * c-tree.h (C_ARRAY_PARAMETER): Define.
836 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
837 function parameter.
838
22e1cf1c
JH
8392014-07-02 Jan Hubicka <hubicka@ucw.cz>
840 Chen Gang <gang.chen.5i5j@gmail.com>
841
842 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
843 releasing symbol.
844
52ec0ea3
MP
8452014-07-01 Marek Polacek <polacek@redhat.com>
846
847 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
848 instead of 0 to WARN_FOR_ASSIGNMENT.
849
d5c3d343
MP
8502014-07-01 Marek Polacek <polacek@redhat.com>
851
852 PR c/58286
853 * c-typeck.c (convert_for_assignment): Pass
854 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
855
6a7253a4
MP
8562014-06-30 Marek Polacek <polacek@redhat.com>
857
858 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
859 has no_sanitize_undefined attribute.
860
5e88a8f4
IZ
8612014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
862
863 PR middle-end/57541
864 * c-array-notation.c (fix_builtin_array_notation_fn):
865 Check for 0 arguments in builtin call. Check that bultin argument is
866 correct.
867 * c-parser.c (c_parser_array_notation): Check for incorrect initial
868 index.
869
9698b078
SH
8702014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
871
872 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
873 qualifiers in __auto_type for atomic types.
874 (c_parser_typeof_specifier): Discard all type qualifiers in
875 __typeof__ for atomic types.
876
6e07c515
MP
8772014-06-25 Marek Polacek <polacek@redhat.com>
878
879 PR c/61162
880 * c-parser.c (c_parser_statement_after_labels): Pass the location of
881 the return expression to c_finish_return.
882
da6f124d
JJ
8832014-06-25 Jakub Jelinek <jakub@redhat.com>
884
885 * c-typeck.c (c_finish_omp_clauses): Make sure
886 OMP_CLAUSE_LINEAR_STEP has correct type.
887
c203e8a7
TS
8882014-06-24 Trevor Saunders <tsaunders@mozilla.com>
889
890 * c-decl.c: Adjust.
891
56ad0e38
JJ
8922014-06-24 Jakub Jelinek <jakub@redhat.com>
893
894 * c-parser.c (c_parser_omp_for_loop): For
895 #pragma omp parallel for simd move lastprivate clause from parallel
896 to for rather than simd.
897
47c2554f
MP
8982014-06-23 Marek Polacek <polacek@redhat.com>
899
900 * c-typeck.c (parser_build_binary_op): Don't call
901 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
902
56363ffd
JH
9032014-06-15 Jan Hubicka <hubicka@ucw.cz>
904
905 * c-parser.c (c_parser_omp_threadprivate): Likewise.
906 * c-decl.c (merge_decls): Likewise.
907
d7ff7ae5
MP
9082014-06-09 Marek Polacek <polacek@redhat.com>
909
910 PR c/36446
911 * c-typeck.c (error_init): Call inform instead of error_at.
912 (pedwarn_init): Call inform instead of pedwarn.
913 (warning_init): Call inform instead of warning_at.
914
24d047a3
JH
9152014-06-07 Jan Hubicka <hubicka@ucw.cz>
916
917 * c-decl.c (merge_decls): Use set_decl_section_name.
918 (duplicate_decls): Remove node if it exists.
919
9bac5cbb
G
9202014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
921
922 PR c/53119
923 * c-typeck.c (push_init_level, process_init_element,
924 pop_init_level): Correct check for zero initialization, move
925 missing brace warning to respect zero initialization.
926
8ffcdea8
MP
9272014-06-05 Marek Polacek <polacek@redhat.com>
928
929 PR c/56724
930 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
931
742938c9
MP
9322014-06-05 Marek Polacek <polacek@redhat.com>
933
934 PR c/49706
935 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
936 on the left hand side operand of a comparison.
937
6447c55d
MP
9382014-06-05 Marek Polacek <polacek@redhat.com>
939
940 PR c/48062
941 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
942 Print note only if the warning was printed.
943
9dc7743c
IZ
9442014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
945
946 PR c/58942
947 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
948 with a pointer.
949
fedfecef
MP
9502014-06-03 Marek Polacek <polacek@redhat.com>
951
952 PR c/60439
953 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
954 c_start_case.
955 * c-tree.h (c_start_case): Update.
956 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
957 switch condition has boolean value.
958
9b2b7279
AM
9592014-06-02 Andrew MacLeod <amacleod@redhat.com>
960
961 * c-decl.c: Include builtins.h.
962 * c-parser.c: Likewise.
963
5c1bc275
MP
9642014-05-27 Marek Polacek <polacek@redhat.com>
965
966 PR c/56724
967 * c-typeck.c (convert_arguments): Get location of a parameter. Change
968 error and warning calls to error_at and warning_at. Pass location of
969 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
970 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
971 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
972
97563bc8
IZ
9732014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
974
975 PR c/61191
976 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
977 function parameters.
978
aede2c10
JH
9792014-05-23 Jan Hubicka <hubicka@ucw.cz>
980
981 * c-decl.c (merge_decls): Preserve symtab node pointers.
982 (duplicate_decls): Free new decl.
983
edbba2ce
TS
9842014-05-23 Thomas Schwinge <thomas@codesourcery.com>
985
f3316c6d
TS
986 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
987 initialization.
988
edbba2ce
TS
989 * c-parser.c (c_parser_omp_target): Return bool values.
990
68c81f24
TS
9912014-05-22 Thomas Schwinge <thomas@codesourcery.com>
992
993 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
994 num_teams_loc variable to num_thread_limit_loc.
995
632f2871
RS
9962014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
997
998 * c-array-notation.c (expand_array_notations): Use void_node
999 instead of void_zero_node.
1000
766090c2
TS
10012014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1002
1003 * c-decl.c (finish_struct): Adjust.
1004 (finish_enum): Likewise.
1005 (bind): Adjust.
1006 (record_inline_static): Likewise.
1007 (push_scope): Likewise.
1008 (make_label): Likewise.
1009 (lookup_label_for_goto): Likewise.
1010 (finish_struct): Likewise.
1011 (finish_enum): Likewise.
1012 (store_parm_decls): Likewise.
1013 (c_push_function_context): Likewise.
1014 * c-lang.h: Remove usage of variable_size gty attribute.
1015 * c-parser.c (c_parse_init): Adjust.
1016 (c_parse_file): Likewise.
1017
2b107f6b
MP
10182014-05-13 Marek Polacek <polacek@redhat.com>
1019
1020 PR c/61162
1021 * c-typeck.c (convert_for_assignment): Pass location to
1022 WARN_FOR_ASSIGNMENT instead of input_location.
1023
d033409e
MP
10242014-05-10 Marek Polacek <polacek@redhat.com>
1025
1026 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1027 maybe_warn_string_init.
1028 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1029 maybe_warn_string_init.
1030 * c-tree.h (maybe_warn_string_init): Update declaration.
1031 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1032 Call pedwarn_init with loc instead of with input_location.
1033 (digest_init): Pass init_loc to maybe_warn_string_init.
1034 (pop_init_level): Call pedwarn_init with loc instead of with
1035 input_location.
1036 (set_init_index): Likewise.
1037 (process_init_element): Likewise.
1038
ea58ef42
MP
10392014-05-09 Marek Polacek <polacek@redhat.com>
1040
1041 PR c/61096
1042 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1043 (c_parser_initelt): Pass location to set_init_label. Pass array index
1044 location to set_init_index.
1045 * c-tree.h (push_init_level): Update declaration.
1046 (pop_init_level): Likewise.
1047 (set_init_index): Likewise.
1048 (set_init_label): Likewise.
1049 * c-typeck.c (error_init): Add location parameter. Call error_at
1050 instead of error.
1051 (digest_init): Pass init_loc to error_init.
1052 (really_start_incremental_init):
1053 (push_init_level): Add location parameter. Pass loc to pop_init_level
1054 and error_init.
1055 (pop_init_level): Likewise.
1056 (set_designator): Add location parameter. Pass loc to pop_init_level,
1057 push_init_level, and error_init.
1058 (set_init_index): Add location parameter. Pass loc to error_init and
1059 set_designator.
1060 (set_init_label): Likewise.
1061 (output_init_element): Pass loc to error_init.
1062 (process_init_element): Pass loc to error_init, pop_init_level,
1063 pedwarn_init, and push_init_level.
1064
661a0813
MP
10652014-05-09 Marek Polacek <polacek@redhat.com>
1066
1067 PR c/50459
1068 * c-parser.c (c_parser_attributes): Parse the arguments as an
1069 expression-list if the attribute takes identifier.
1070
2793eeab
MP
10712014-05-08 Marek Polacek <polacek@redhat.com>
1072
1073 PR c/61053
1074 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1075 TYPE_ALIGN_UNIT.
1076
f827930a
MP
10772014-05-08 Marek Polacek <polacek@redhat.com>
1078
1079 PR c/61077
1080 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1081 of main.
1082
1d60af08
KZ
10832014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1084 Mike Stump <mikestump@comcast.net>
1085 Richard Sandiford <rdsandiford@googlemail.com>
1086
1087 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1088 (finish_enum): Use wide-int interfaces.
1089 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1090 * c-typeck.c (build_c_cast): Likewise.
1091 (set_nonincremental_init_from_string): Likewise.
1092 (c_tree_equal): Likewise.
1093
a0e24419
MP
10942014-05-02 Marek Polacek <polacek@redhat.com>
1095
1096 PR c/25801
1097 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1098 Return size_one_node when the type is not complete.
1099 (pointer_diff): Remove comment.
1100 (build_unary_op): Improve error messages.
1101
19fc9faa
MP
11022014-05-02 Marek Polacek <polacek@redhat.com>
1103
1104 * c-typeck.c (c_finish_return): Separate warning_at calls.
1105
63bc4e87
MP
11062014-05-02 Marek Polacek <polacek@redhat.com>
1107
1108 * c-tree.h (error_init): Remove declaration.
1109 (pedwarn_init): Likewise.
1110 * c-typeck.c (error_init): Make static and move above.
1111 (pedwarn_init): Likewise.
1112 (warning_init): Move above.
1113 (maybe_warn_string_init): Likewise.
1114
4bd2511b
JL
11152014-05-01 Jeff Law <law@redhat.com>
1116
1117 Revert:
1118
1119 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1120 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1121 avoid goto.
1122
6a358dcb
MP
11232014-05-02 Marek Polacek <polacek@redhat.com>
1124
1125 PR c/60784
1126 * c-typeck.c (push_init_level): Set constructor_designated to
1127 p->designated for structures.
1128
ae5ebda4
MP
11292014-05-01 Marek Polacek <polacek@redhat.com>
1130
1131 PR c/60915
1132 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1133 function-definition has an attribute after the declarator.
1134
96b40f8d
MP
11352014-05-01 Marek Polacek <polacek@redhat.com>
1136
1137 PR c/60257
1138 * c-typeck.c (warning_init): Add location_t parameter. Call
1139 warning_at instead of warning.
1140 (push_init_level): Pass input_location to warning_init.
1141 (add_pending_init): Add location_t parameter. Pass loc to
1142 warning_init.
1143 (set_nonincremental_init): Pass input_location to add_pending_init.
1144 (set_nonincremental_init_from_string): Likewise.
1145 (output_init_element): Pass loc to warning_init and to
1146 add_pending_init.
1147
32e00768
MP
11482014-05-01 Marek Polacek <polacek@redhat.com>
1149
1150 PR c/43395
1151 * c-typeck.c (c_finish_return): Distinguish between label and variable
1152 when warning about returning local address.
1153
c9379ce2
MP
11542014-05-01 Marek Polacek <polacek@redhat.com>
1155
1156 PR c/29467
1157 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1158 in C89 mode.
1159
d00887e8
MP
11602014-05-01 Marek Polacek <polacek@redhat.com>
1161
1162 PR c/43245
1163 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1164 instead of 0 to WARN_FOR_QUALIFIERS.
1165
5436fa2e
MP
11662014-05-01 Marek Polacek <polacek@redhat.com>
1167
1168 PR c/56989
1169 * c-typeck.c (default_conversion): Use better location for
1170 error call.
1171
f8ed5150
MP
11722014-04-30 Marek Polacek <polacek@redhat.com>
1173
1174 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1175 also when SANITIZE_FLOAT_DIVIDE is on.
1176
8337d1db
MP
11772014-04-30 Marek Polacek <polacek@redhat.com>
1178
1179 PR c/60139
1180 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1181 and pedwarn_init. Use loc insted of input_location.
1182
c4bdc42f
MP
11832014-04-30 Marek Polacek <polacek@redhat.com>
1184
1185 PR c/60351
1186 * c-typeck.c (build_binary_op): Use location when warning about
1187 shift count.
1188
45484dcf
MP
11892014-04-25 Marek Polacek <polacek@redhat.com>
1190
1191 PR c/18079
1192 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1193 always_inline/noinline and hot/cold attributes.
1194
34cf811f
MP
11952014-04-25 Marek Polacek <polacek@redhat.com>
1196
1197 PR c/60114
1198 * c-parser.c (c_parser_initelt): Pass input_location to
1199 process_init_element.
1200 (c_parser_initval): Pass loc to process_init_element.
1201 * c-tree.h (process_init_element): Adjust declaration.
1202 * c-typeck.c (push_init_level): Pass input_location to
1203 process_init_element.
1204 (pop_init_level): Likewise.
1205 (set_designator): Likewise.
1206 (output_init_element): Add location_t parameter. Pass loc to
1207 digest_init.
1208 (output_pending_init_elements): Pass input_location to
1209 output_init_element.
1210 (process_init_element): Add location_t parameter. Pass loc to
1211 output_init_element.
1212
42056eac
JJ
12132014-04-24 Jakub Jelinek <jakub@redhat.com>
1214
1215 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1216 atomic-clause, allow comma in between atomic-clause and
1217 seq_cst.
1218
e162a134
JJ
12192014-04-22 Jakub Jelinek <jakub@redhat.com>
1220
1221 PR c/59073
1222 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1223 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1224
2f6babac
IZ
12252014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1226
1227 PR middle-end/60469
1228 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1229 create_tmp_var instead build_decl for creating temps.
1230 (build_array_notation_expr): Likewise.
1231 (fix_conditional_array_notations_1): Likewise.
1232 (fix_array_notation_expr): Likewise.
1233 (fix_array_notation_call_expr): Likewise.
1234
8edbfaa6
JJ
12352014-03-28 Jakub Jelinek <jakub@redhat.com>
1236
1237 PR c++/60689
1238 * c-tree.h (c_build_function_call_vec): New prototype.
1239 * c-typeck.c (build_function_call_vec): Don't call
1240 resolve_overloaded_builtin here.
1241 (c_build_function_call_vec): New wrapper function around
1242 build_function_call_vec. Call resolve_overloaded_builtin here.
1243 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1244 Call c_build_function_call_vec instead of build_function_call_vec.
1245 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1246 * c-decl.c (finish_decl): Likewise.
1247
7485aeea
MLI
12482014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1249
1250 PR c/55383
1251 * c-typeck.c: Use correct format string in cast-qual warning
1252
b17a8b07
TS
12532014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1254
1255 * c-decl.c (c_decl_attributes): Use
1256 lang_hooks.types.omp_mappable_type.
1257 * c-typeck.c (c_finish_omp_clauses): Likewise.
1258
3af9c5e9
MP
12592014-03-06 Marek Polacek <polacek@redhat.com>
1260
1261 PR c/60197
1262 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1263 of checking tree code.
1264
1c9f5f33
PK
12652014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1266
1267 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1268 (c_parser_parameter_declaration): Likewise.
1269
cc28fc7f
MP
12702014-02-19 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/60195
1273 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1274 Call mark_exp_read on exp.value.
1275 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1276 TREE_ADDRESSABLE on old instead of val.
1277 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1278
b581c05c
PK
12792014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1280
1281 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1282 C_EXPR_APPEND by vec_safe_push.
1283 * c-tree.h (C_EXPR_APPEND): Remove.
1284
81e5eca8
MP
12852014-01-31 Marek Polacek <polacek@redhat.com>
1286
1287 PR c/59963
1288 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1289 build_function_call_vec.
1290 (build_function_call): Likewise.
1291 (build_atomic_assign): Likewise.
1292 (build_function_call_vec): Add arg_loc parameter. Use it.
1293 (convert_arguments): Likewise.
1294 (convert_for_assignment): Rename rhs_loc to expr_loc.
1295 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1296 (c_parser_objc_keywordexpr): Likewise.
1297 (c_parser_postfix_expression_after_primary): Call
1298 build_function_call_vec with expr_loc rather than op_loc.
1299 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1300 build_function_call_vec.
1301 (c_parser_expr_list): Add locations parameter. Fill it with locations
1302 of function arguments.
1303 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1304
68fca595
MP
13052014-01-30 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/59940
1308 * c-typeck.c (build_function_call_vec): Use loc parameter.
1309 (convert_arguments): Add location parameter. Use it.
1310 (ep_convert_and_check): Likewise.
1311 (build_atomic_assign): Adjust convert_for_assignment call.
1312 (build_modify_expr): Likewise.
1313 (digest_init): Likewise.
1314 (c_finish_return): Likewise.
1315 (build_conditional_expr): Adjust ep_convert_and_check calls.
1316 (convert_for_assignment): Add rhs_loc parameter. Use it.
1317 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1318 calls.
1319
fa337f3a
RB
13202014-01-30 Richard Biener <rguenther@suse.de>
1321
1322 PR c/59905
1323 * c-typeck.c (build_function_call_vec): Do not replace calls
1324 to a function via an incompatible type with a runtime abort.
1325
b72271b9
BI
13262014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1327
1328 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1329 flag_enable_cilkplus with flag_cilkplus.
1330 (c_parser_direct_declarator_inner): Likewise.
1331 (c_parser_attribute_any_word): Likewise.
1332 (c_parser_attributes): Likewise.
1333 (c_parser_compound_statement): Likewise.
1334 (c_parser_statement_after_labels): Likewise.
1335 (c_parser_if_statement): Likewise.
1336 (c_parser_switch_statement): Likewise.
1337 (c_parser_do_statement): Likewise.
1338 (c_parser_for_statement): Likewise.
1339 (c_parser_unary_expression): Likewise.
1340 (c_parser_postfix_expression): Likewise.
1341 (c_parser_postfix_expression_after_primary): Likewise.
1342 (c_parser_postfix_expression_after_primary): Likewise.
1343 (c_parser_omp_clause_name): Likewise.
1344 (c_finish_omp_declare_simd): Likewise.
1345 (c_parser_cilk_verify_simd): Likewise.
1346 * c-typeck.c (build_array_ref): Likewise.
1347 (build_function_call_vec): Likewise.
1348 (convert_arguments): Likewise.
1349 (build_compound_expr): Likewise.
1350 (c_finish_return): Likewise.
1351 (c_finish_if_stmt): Likewise.
1352 (c_finish_loop): Likewise.
1353 (build_binary_op): Likewise.
1354
393e8e8b
MP
13552014-01-23 Marek Polacek <polacek@redhat.com>
1356
1357 PR c/59846
1358 * c-typeck.c (parser_build_binary_op): Use location instead of
1359 input_location.
1360 (build_binary_op): Pass location to shorten_compare.
1361
f04dda30
MP
13622014-01-23 Marek Polacek <polacek@redhat.com>
1363
1364 PR c/58346
1365 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1366 an empty aggregate.
1367
789eadcd
MP
13682014-01-23 Marek Polacek <polacek@redhat.com>
1369
1370 PR c/59871
1371 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1372 of a comma expression.
1373 (emit_side_effect_warnings): Likewise.
1374
40f14e9f
BI
13752014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1376
1377 PR c/59825
1378 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1379 function to use walk_tree and moved a lot of its functionality to
1380 expand_array_notations.
1381 (expand_array_notations): New function.
1382
74558dd9
BI
13832014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1384
1385 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1386 attribute an attribute without value.
1387
652fea39
JJ
13882014-01-23 Jakub Jelinek <jakub@redhat.com>
1389
1390 PR middle-end/58809
1391 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1392 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1393
f34f1c87
MP
13942014-01-22 Marek Polacek <polacek@redhat.com>
1395
1396 PR c/59891
1397 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1398 of remove_c_maybe_const_expr on op1 and op2.
1399
241f845a
JJ
14002014-01-15 Jakub Jelinek <jakub@redhat.com>
1401
1402 PR c/58943
1403 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1404 effects, preevaluate rhs using SAVE_EXPR first.
1405
9a74f20c
BI
14062014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1407
1408 PR c++/59631
1409 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1410 statements with if-elseif statements.
1411
96066ce1
MP
14122014-01-06 Marek Polacek <polacek@redhat.com>
1413
1414 PR c/57773
1415 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1416 defined bit-field types only in ISO C.
1417
23a5b65a
RS
14182014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1419
1420 Update copyright years
1421
f9030485
RS
14222014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1423
1424 * c-array-notation.c: Use the standard form for the copyright notice.
1425
41958c28
BI
14262013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1427
1428 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1429 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1430 field in parser is not empty. If not-empty, call the function
1431 c_parser_finish_omp_declare_simd.
1432 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1433 between SIMD-enabled functions and #pragma simd. Added new parameter.
1434 (c_parser_cilk_all_clauses): Modified the usage of the function
1435 c_parser_cilk_clause_vectorlength as mentioned above.
1436 (c_parser_cilk_simd_fn_vector_attrs): New function.
1437 (c_finish_cilk_simd_fn_tokens): Likewise.
1438 (is_cilkplus_vector_p): Likewise.
1439 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1440 "nomask," and "mask" strings in clause name.
1441 (c_parser_omp_all_clauses): Added 3 new case statements:
1442 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1443 PRAGMA_CILK_CLAUSE_NOMASK.
1444 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1445 check for vector attribute and if so call the function
1446 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1447 called the function c_finish_cilk_simd_fn_tokens.
1448 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1449 parser field is non-empty. If so, parse them as you would parse
1450 the omp declare simd pragma.
1451 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1452 Added a check when step is a parameter and flag it as error.
1453 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1454 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1455 pragma_omp_clause.
1456
cef0fd0e
TS
14572013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1458
1459 * c-parser.c (c_parser_omp_parallel): Fix description.
1460
12893402
BI
14612013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1462
1463 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1464 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1465 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1466 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1467
296674db
JM
14682013-12-04 Joseph Myers <joseph@codesourcery.com>
1469
1470 PR c/52023
1471 * c-parser.c (c_parser_alignas_specifier): Use
1472 c_sizeof_or_alignof_type instead of c_alignof.
1473 (c_parser_alignof_expression): Likewise, with min_alignof
1474 parameter depending on alignof spelling used.
1475
edd28054
MP
14762013-12-04 Marek Polacek <polacek@redhat.com>
1477
1478 PR c/54113
1479 * c-decl.c (start_function): Don't warn for missing prototype for
1480 inline functions.
1481
da0fc454
MP
14822013-12-03 Marek Polacek <polacek@redhat.com>
1483
1484 PR c/59351
1485 * c-decl.c (build_compound_literal): Allow compound literals with
1486 empty initial value.
1487
4c2ecab0
JM
14882013-12-02 Joseph Myers <joseph@codesourcery.com>
1489
1490 PR c/58235
1491 * c-typeck.c (build_modify_expr): Diagnose assignment to
1492 expression with array type.
1493
340baef7
JM
14942013-11-29 Joseph Myers <joseph@codesourcery.com>
1495
1496 PR c/42262
1497 * c-typeck.c (process_init_element): Do not treat a string as
1498 initializing a whole array when used with a designator for an
1499 individual element.
1500
6763b9f7
JM
15012013-11-29 Joseph Myers <joseph@codesourcery.com>
1502
1503 PR c/57574
1504 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1505 an inline function following a static declaration.
1506
e7bd1de1
JJ
15072013-11-28 Jakub Jelinek <jakub@redhat.com>
1508
1509 PR c/59310
1510 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1511 to p_name before calling c_parser_omp_teams instead of after.
1512 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1513 argument. Remove unused p_name variable.
1514
0136f8f0
AH
15152013-11-27 Aldy Hernandez <aldyh@redhat.com>
1516 Jakub Jelinek <jakub@redhat.com>
1517
1518 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1519 external_scope is NULL.
1520
241b71bb
TV
15212013-11-27 Tom de Vries <tom@codesourcery.com>
1522 Marc Glisse <marc.glisse@inria.fr>
1523
1524 PR c++/59032
1525 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1526
2fb9a547
AM
15272013-11-22 Andrew MacLeod <amacleod@redhat.com>
1528
1529 * c-typeck.c: Add required include files from gimple.h.
1530
8400e75e
DM
15312013-11-22 David Malcolm <dmalcolm@redhat.com>
1532
1533 * c-decl.c (define_label, shadow_tag_warned)
1534 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1535 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1536 (declspecs_add_type): Remove use of in_system_header macro.
1537 * c-parser.c (c_parser_unary_expression): Likewise.
1538 * c-typeck.c (store_init_value, process_init_element)
1539 (c_start_case): Likewise.
1540
1541 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1542 macro.
1543
1544 * c-parser.c (c_parser_set_source_position_from_token): Remove
1545 reference to in_system_header from comment.
1546
386b1f1f
RS
15472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1548
1549 * c-decl.c (grokdeclarator): Update comment to refer to
1550 tree_to_[su]hwi rather than tree_low_cst.
1551
ae7e9ddd
RS
15522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1553
1554 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1555 tree_to_uhwi throughout.
1556
9439e9a1
RS
15572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1558
1559 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1560 throughout.
1561
9541ffee
RS
15622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1563
1564 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1565 throughout.
1566
c02065fc
AH
15672013-11-15 Aldy Hernandez <aldyh@redhat.com>
1568
1569 * c-parser.c (c_parser_cilk_simd): New.
1570 (c_parser_cilk_verify_simd): New.
1571 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1572 (c_parser_omp_for_loop): Add case for NE_EXPR.
1573 Set c_break_label for CILK_SIMD.
1574 (c_parser_cilk_clause_vectorlength): New.
1575 (c_parser_cilk_clause_linear): New.
1576 (c_parser_cilk_clause_name): New.
1577 (c_parser_cilk_all_clauses): New.
1578 * c-typeck.c (build_unary_op): Pass location argument to
1579 readonly_error.
1580 (build_modify_expr): Same.
1581 (build_asm_expr): Same.
1582 (c_finish_bc_stmt): Error on break/continue in loops.
1583
18f429e2
AM
15842013-11-14 Andrew MacLeod <amacleod@redhat.com>
1585
1586 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1587
d8a2d370
DN
15882013-11-14 Diego Novillo <dnovillo@google.com>
1589
1590 * c-decl.c: Include print-tree.h.
1591 Include stor-layout.h.
1592 Include varasm.h.
1593 Include attribs.h.
1594 Include stringpool.h.
1595 * c-lang.c: Include fold-const.h.
1596 * c-parser.c: Include stringpool.h.
1597 Include attribs.h.
1598 Include stor-layout.h.
1599 Include varasm.h.
1600 Include trans-mem.h.
1601 * c-typeck.c: Include stor-layout.h.
1602 Include trans-mem.h.
1603 Include varasm.h.
1604 Include stmt.h.
1605
38b7bc7f
JM
16062013-11-13 Joseph Myers <joseph@codesourcery.com>
1607
1608 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1609 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1610 __auto_type.
1611 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1612 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1613 RID_AUTO_TYPE.
1614 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1615 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1616 (c_parser_declarator, c_parser_direct_declarator_inner)
1617 (c_parser_parameter_declaration, c_parser_type_name): All callers
1618 changed.
1619 (c_parser_declaration_or_fndef): Handle declarations with type
1620 determined from the initializer.
1621
45b0be94
AM
16222013-11-12 Andrew MacLeod <amacleod@redhat.com>
1623
18f429e2 1624 * c-typeck.c: Include gimplify.h.
45b0be94 1625
582d9b50
JM
16262013-11-12 Joseph Myers <joseph@codesourcery.com>
1627
1628 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1629 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1630 comment.
1631 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1632 or _Thread_local as appropriate in diagnostics.
1633 (build_null_declspecs): Initialize ret->thread_gnu_p.
1634 (declspecs_add_scspec): Handle either __thread or _Thread_local
1635 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1636 pedantic. Do not disallow _Thread_local extern and _Thread_local
1637 static.
1638
267bac10
JM
16392013-11-07 Joseph Myers <joseph@codesourcery.com>
1640 Andrew MacLeod <amacleod@redhat.com>
1641
1642 * c-aux-info.c (gen_type): Handle atomic qualifier.
1643 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1644 qualifiers when compating types.
1645 (shadow_tag_warned): Handle atomic_p in declspecs.
1646 (quals_from_declspecs): Likewise.
1647 (start_decl): Use c_type_promotes_to when promoting argument
1648 types.
1649 (grokdeclarator): Handle _Atomic.
1650 (get_parm_info): Diagnose any qualifier on "void" as only
1651 parameter.
1652 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1653 comparing types. Use c_type_promotes_to when promoting argument
1654 types.
1655 (finish_function): Use c_type_promotes_to when promoting argument
1656 types.
1657 (build_null_declspecs): Handle atomic_p in declspecs.
1658 (declspecs_add_qual): Handle RID_ATOMIC.
1659 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1660 (c_token_starts_declspecs): Handle RID_ATOMIC.
1661 (c_parser_declspecs): Handle atomic type specifiers and
1662 qualifiers.
1663 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1664 from types of expressions with atomic type.
1665 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1666 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1667 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1668 (c_parser_statement_after_labels, c_parser_switch_statement)
1669 (c_parser_for_statement, c_parser_expr_no_commas)
1670 (c_parser_conditional_expression, c_parser_binary_expression)
1671 (c_parser_cast_expression, c_parser_unary_expression)
1672 (c_parser_postfix_expression)
1673 (c_parser_postfix_expression_after_primary, c_parser_expression):
1674 Use convert_lvalue_to_rvalue.
1675 (c_parser_expression_conv, c_parser_expr_list): Document
1676 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1677 (c_parser_objc_synchronized_statement): Use
1678 convert_lvalue_to_rvalue.
1679 (c_parser_objc_selector): Handle RID_ATOMIC.
1680 (c_parser_objc_receiver, c_parser_array_notation): Use
1681 convert_lvalue_to_rvalue.
1682 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1683 _Atomic (type-name).
1684 (struct c_declspecs): Add atomic_p field.
1685 (convert_lvalue_to_rvalue): Declare.
1686 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1687 corresponding atomic types.
1688 (qualify_type): Don't add _Atomic qualifiers from second argument.
1689 (comp_target_types): Do not allow _Atomic mismatches.
1690 (type_lists_compatible_p): Do not remove atomic qualifiers when
1691 comparing types.
1692 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1693 (build_atomic_assign): New functions.
1694 (build_unary_op): Use build_atomic_assign for atomic increment and
1695 decrement.
1696 (build_conditional_expr): Do not treat _Atomic void as a qualified
1697 version of void.
1698 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1699 (find_anonymous_field_with_type, convert_to_anonymous_field)
1700 (convert_for_assignment): Do not remove atomic qualifiers when
1701 comparing types.
1702 (digest_init): Do not accept initialization of arrays of atomic
1703 elements by string constants.
1704 (build_asm_expr): Use convert_lvalue_to_rvalue.
1705 (build_binary_op): Do not treat _Atomic void as a qualified
1706 version of void.
1707
0c249d4b
DD
17082013-11-06 DJ Delorie <dj@redhat.com>
1709
1710 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1711 both explicit and builtin, print the location of the explicit one.
1712
6d7f7e0a
TB
17132013-11-05 Tobias Burnus <burnus@net-b.de>
1714
1715 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1716 c_parser_omp_distribute, c_parser_omp_teams,
1717 c_parser_omp_target, c_parser_omp_declare): Handle
1718 -fopenmp-simd.
1719
b906f4ca
MP
17202013-11-03 Marek Polacek <polacek@redhat.com>
1721
1722 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1723
ee1d5a02
JJ
17242013-11-01 Jakub Jelinek <jakub@redhat.com>
1725
1726 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1727 check_dup_generic at the end, unless remove is true.
1728 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1729 remove = true;.
1730 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1731
5a9785fb
JJ
17322013-10-31 Jakub Jelinek <jakub@redhat.com>
1733
1734 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1735 with decl that is not pointer nor array.
1736
939b37da
BI
17372013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1738
1739 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1740 a spawning function is found.
1741 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1742 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1743 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1744 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1745 case.
1746 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1747 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1748 expr.
1749 (c_finish_return): Added a check to reject _Cilk_spawn in return
1750 expression.
1751 (build_cilk_spawn): New function.
1752 (build_cilk_sync): Likewise.
1753 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1754
d4af74d4
TB
17552013-10-27 Tobias Burnus <burnus@net-b.de>
1756
1757 PR other/33426
1758 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1759 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1760 (c_parser_statement_after_labels): Update calls.
1761
d73749df 17622013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1763
1764 PR other/33426
1765 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1766 Handle PRAGMA_IVDEP.
1767 (c_parser_statement_after_labels): Update call.
1768
f28aa681
MP
17692013-10-24 Marek Polacek <polacek@redhat.com>
1770
1771 * c-parser.c (c_parser_struct_declaration): Add a comment.
1772 (c_parser_declarator): Don't allow _Alignas here.
1773
0645c1a2
AM
17742013-10-17 Andrew MacLeod <amacleod@redhat.com>
1775
1776 * c-parser.c: Include omp-low.h.
1777 * c-typeck.c: Likewise.
1778
568a31f2
MP
17792013-10-17 Marek Polacek <polacek@redhat.com>
1780
1781 PR c/58267
1782 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1783 Document syntax of the array-declarator.
1784 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1785 are not permitted.
1786 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1787 (c_parser_struct_declaration): Likewise.
1788 (c_parser_declarator): Likewise.
1789 (c_parser_direct_declarator_inner): Likewise.
1790 (c_parser_parameter_declaration): Likewise.
1791 (c_parser_type_name): Likewise.
1792
acf0174b
JJ
17932013-10-11 Jakub Jelinek <jakub@redhat.com>
1794
1795 * c-lang.h (current_omp_declare_target_attribute): New extern
1796 decl.
1797 * c-parser.c: Include c-lang.h.
1798 (struct c_parser): Change tokens to c_token *.
1799 Add tokens_buf field. Change tokens_avail type to unsigned int.
1800 (c_parser_consume_token): If parser->tokens isn't
1801 &parser->tokens_buf[0], increment parser->tokens.
1802 (c_parser_consume_pragma): Likewise.
1803 (enum pragma_context): Add pragma_struct and pragma_param.
1804 (c_parser_external_declaration): Adjust
1805 c_parser_declaration_or_fndef caller.
1806 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1807 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1808 Adjust recursive call.
1809 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1810 of pragma_external.
1811 (c_parser_parameter_declaration): Use pragma_param instead of
1812 pragma_external.
1813 (c_parser_compound_statement_nostart, c_parser_label,
1814 c_parser_for_statement): Adjust
1815 c_parser_declaration_or_fndef callers.
1816 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1817 it through to c_parser_conditional_expression.
1818 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1819 pass it through to c_parser_binary_expression. Adjust recursive
1820 call.
1821 (c_parser_binary_expression): Remove prec argument, add
1822 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1823 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1824 binop matches it, use build2 instead of parser_build_binary_op.
1825 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1826 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1827 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1828 Handle pragma_struct and pragma_param the same as pragma_external.
1829 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1830 (c_parser_omp_variable_list): Parse array sections for
1831 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1832 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1833 (c_parser_omp_clause_reduction): Handle user defined reductions.
1834 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1835 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1836 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1837 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1838 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1839 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1840 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1841 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1842 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1843 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1844 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1845 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1846 (c_parser_omp_for_loop): Add CODE argument, pass it through
1847 to c_finish_omp_for. Change last argument to cclauses,
1848 and adjust uses to grab parallel clauses from the array of all
1849 the split clauses. Adjust c_parser_binary_expression,
1850 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1851 (omp_split_clauses): New function.
1852 (c_parser_omp_simd): New function.
1853 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1854 Allow the function to be called also when parsing combined constructs,
1855 and call c_parser_omp_simd when parsing for simd.
1856 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1857 #pragma omp section, require exactly one structured-block instead of
1858 sequence of statements.
1859 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1860 Allow the function to be called also when parsing combined constructs.
1861 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1862 Allow the function to be called also when parsing combined
1863 constructs.
1864 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1865 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1866 c_parser_omp_teams, c_parser_omp_target_data,
1867 c_parser_omp_target_update, c_parser_omp_target,
1868 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1869 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1870 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1871 (c_parser_omp_construct): Add p_name and mask vars. Handle
1872 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1873 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1874 and c_parser_omp_sections callers.
1875 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1876 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1877 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1878 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1879 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1880 OMP_CLAUSE_DEPEND.
1881 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1882 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1883 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1884 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1885 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1886 * c-typeck.c: Include tree-inline.h.
1887 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1888 handle_omp_array_sections_1, handle_omp_array_sections,
1889 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1890 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1891 user defined reductions.
1892 (c_tree_equal): New function.
1893 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1894 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1895 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1896 c_check_omp_declare_reduction_r): New prototypes.
1897 * c-decl.c (current_omp_declare_target_attribute): New variable.
1898 (c_decl_attributes): New function.
1899 (start_decl, start_function): Use it instead of decl_attributes.
1900 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1901 c_omp_reduction_decl, c_omp_reduction_lookup,
1902 c_check_omp_declare_reduction_r): New functions.
1903
0a6c2227
TT
19042013-09-25 Tom Tromey <tromey@redhat.com>
1905
1906 * Make-lang.in (c/gccspec.o): Remove.
1907 (CFLAGS-c/gccspec.o): New variable.
1908 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1909 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1910 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1911
f3bc55f0
TT
19122013-09-25 Tom Tromey <tromey@redhat.com>
1913
1914 * Make-lang.in (c/gccspec.o): Don't use subshell.
1915
a24d975c
MP
19162013-09-18 Marek Polacek <polacek@redhat.com>
1917
1918 PR sanitize/58443
1919 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1920 Remove unnecessary check.
1921
ce6923c5
MP
19222013-09-18 Marek Polacek <polacek@redhat.com>
1923
1924 PR sanitizer/58411
1925 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1926 no_sanitize_undefined attribute.
1927
a1e51df9
KT
19282013-09-13 Kai Tietz <ktietz@redhat.com>
1929
1930 PR target/57848
1931 * c-decl.c (c_builtin_function_ext_scope): Remove
1932 wrong assumption that it is never called on prexisting
1933 symbol.
1934
0af94e6f
JR
19352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1936
1937 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1938
20059c8b
GDR
19392013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1940
1941 * c-objc-common.c (c_tree_printer): Tidy.
1942
de5a5fa1
MP
19432013-08-30 Marek Polacek <polacek@redhat.com>
1944
1945 * c-typeck.c (build_binary_op): Add division by zero and shift
1946 instrumentation.
1947
2531a1d9 19482013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1949 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1950
6e2bcc98 1951 PR c/35649
2531a1d9
JR
1952 * c-typeck.c (c_common_type): Prefer double_type_node over
1953 other REAL_TYPE types with the same precision.
1954 (convert_arguments): Likewise.
1955
025311c4
GDR
19562013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1957
1958 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1959 (c_initialize_diagnostics): Call a destructor for the early printer.
1960
da6ca2b5
GDR
19612013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1962
1963 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1964 printer initialization.
1965
318cda85 19662013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1967
318cda85
BI
1968 PR c/57490
1969 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1970 check for truth values.
1971 (expand_array_notation_exprs): Added truth values case. Removed an
1972 unwanted else. Added for-loop to walk through subtrees in default
1973 case.
1974
b066401f
GDR
19752013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1976
1977 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1978
fb48aadc
JM
19792013-07-23 Joseph Myers <joseph@codesourcery.com>
1980
1981 * c-parser.c (struct c_generic_association): Fix typo.
1982
433cc7b0
TT
19832013-07-23 Tom Tromey <tromey@redhat.com>
1984 Joseph Myers <joseph@codesourcery.com>
1985
1986 * c-parser.c (struct c_generic_association): New.
1987 (c_generic_association_d): New typedef.
1988 (c_parser_generic_selection): New function.
1989 (c_parser_postfix_expression): Handle RID_GENERIC.
1990
26d40c3d
JM
19912013-07-13 Jason Merrill <jason@redhat.com>
1992
1993 PR c++/57793
1994 * c-decl.c (finish_struct): Check for too-large class.
1995
ecdbd01a 19962013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1997
1998 PR c/57821
1999 * c-typeck.c (set_init_index): When folding, check for index overflow.
2000
1141ed3f
BI
20012013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2002
2003 * c-parser.c (c_parser_array_notation): Removed rejection of array
2004 notations in an array of function pointers.
2005
713b46fa
BI
20062013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2007
2008 * c-array-notation.c (make_triplet_val_inv): New function.
2009 (create_cmp_incr): Likewise.
2010 (create_array_refs): Likewise.
2011 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2012 Also modularized common parts between functions and called the function.
2013 (build_array_notation_expr): Likewise.
2014 (fix_conditional_array_notations_1): Likewise.
2015 (fix_array_notation_expr): Likewise.
2016 (fix_array_notation_call_expr): Likewise.
2017
92f20202
MP
20182013-06-18 Marek Polacek <polacek@redhat.com>
2019
2020 PR c/57630
2021 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2022
73a23b06
BI
20232013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2024
2025 * c-array-notation.c (build_array_notation_expr): Reject array notation
2026 mismatch between LHS and RHS even inside a call_expr. Also, removed
2027 a couple while statements that were dead code.
2028
00b8517d
BI
20292013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2030
2031 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2032 excessive precision expressions in function parameters. Also removed
2033 couple unwanted while statements.
2034
1509bdda
BI
20352013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2036
2037 * c-array-notation.c (expand_array_notation_exprs): Added
2038 ARRAY_NOTATION_REF case.
2039
d60f1706
BI
20402013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2041
2042 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2043 function to c-family/array-notation-common.c.
2044 (is_cilkplus_reduce_builtin): Likewise.
2045 (find_rank): Likewise.
2046 (extract_array_notation_exprs): Likewise.
2047 (replace_array_notations): Likewise.
2048 (find_inv_trees): Likewise.
2049 (replace_inv_trees): Likewise.
2050 (contains_array_notation_expr): Likewise.
2051 (find_correct_array_notation_type): Likewise.
2052 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2053 (struct inv_list): Moved this to c-family/array-notation-common.c.
2054 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2055
6d6efbb3
BI
20562013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2057
2058 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2059 reduction functions outside the for-loop. Added a check if the fundecl
2060 is non-NULL. Finally, removed an unwanted if-statement, and made the
2061 body unconditional.
2062
25c22937
BI
20632013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2064
2065 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2066 condition of the if-statement matches the rank of else-block and then-
2067 block when array notations are used.
2068 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2069 expression after the entire function body is parsed.
2070 (c_parser_expr_no_commas): Delayed creating array notation expressions
2071 to the end of function parsing.
2072 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2073 whole if-statement instead of just the condition.
2074 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2075
edd25645
BI
20762013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2077
2078 PR c/57474
2079 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2080 array to NULL_TREE if they are unused. Also added a check for the
2081 field to be NULL before its fields are used in future.
2082
065ce7f1
RO
20832013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2084
2085 PR bootstrap/57450
2086 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2087 (build_array_notation_expr): Likewise.
2088
36536d79
BI
20892013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2090
2091 * c-typeck.c (build_array_ref): Added a check to see if array's
2092 index is greater than one. If true, then emit an error.
2093 (build_function_call_vec): Exclude error reporting and checking
2094 for builtin array-notation functions.
2095 (convert_arguments): Likewise.
2096 (c_finish_return): Added a check for array notations as a return
2097 expression. If true, then emit an error.
2098 (c_finish_loop): Added a check for array notations in a loop
2099 condition. If true then emit an error.
2100 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2101 (build_binary_op): Added a check for array notation expr inside
2102 op1 and op0. If present, we call another function to find correct
2103 type.
2104 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2105 * c-parser.c (c_parser_compound_statement): Check if array
2106 notation code is used in tree, if so, then transform them into
2107 appropriate C code.
2108 (c_parser_expr_no_commas): Check if array notation is used in LHS
2109 or RHS, if so, then build array notation expression instead of
2110 regular modify.
2111 (c_parser_postfix_expression_after_primary): Added a check for
2112 colon(s) after square braces, if so then handle it like an array
2113 notation. Also, break up array notations in unary op if found.
2114 (c_parser_direct_declarator_inner): Added a check for array
2115 notation.
2116 (c_parser_compound_statement): Added a check for array notation in
2117 a stmt. If one is present, then expand array notation expr.
2118 (c_parser_if_statement): Likewise.
2119 (c_parser_switch_statement): Added a check for array notations in
2120 a switch statement's condition. If true, then output an error.
2121 (c_parser_while_statement): Similarly, but for a while.
2122 (c_parser_do_statement): Similarly, but for a do-while.
2123 (c_parser_for_statement): Similarly, but for a for-loop.
2124 (c_parser_unary_expression): Check if array notation is used in a
2125 pre-increment or pre-decrement expression. If true, then expand
2126 them.
2127 (c_parser_array_notation): New function.
2128 * c-array-notation.c: New file.
2129 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2130
cd192ccc
MS
21312013-05-23 Mike Stump <mikestump@comcast.net>
2132
2133 * c-typeck.c (convert_for_assignment): Handle references to memory
2134 spaces better.
2135
427b248d
JM
21362013-05-16 Jason Merrill <jason@redhat.com>
2137
2138 * Make-lang.in (cc1$(exeext)): Use link mutex.
2139
44d90fe1
PC
21402013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2141
2142 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2143 to simply use OPT_Wpointer_arith.
2144 (build_unary_op): Likewise.
2145
4e7d7b3d
JJ
21462013-04-03 Jakub Jelinek <jakub@redhat.com>
2147
2148 PR c/19449
2149 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2150 argument. If set, or it temporarily for parsing of the first
2151 argument into force_folding_builtin_constant_p.
2152 (c_parser_postfix_expression): Adjust callers.
2153
839b422f
RB
21542013-03-21 Richard Biener <rguenther@suse.de>
2155
2156 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2157 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2158
2ee028f1
MP
21592013-02-12 Marek Polacek <polacek@redhat.com>
2160
2161 PR c/44938
2162 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2163 origtypes to NULL.
2164
8824edff
JJ
21652013-01-24 Jakub Jelinek <jakub@redhat.com>
2166
2167 PR c/56078
2168 * c-typeck.c (set_nonincremental_init_from_string): If
2169 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2170 returned false.
2171 (process_init_element): Likewise.
2172
eadd3d0d
JJ
21732012-12-20 Jakub Jelinek <jakub@redhat.com>
2174
2175 PR c++/55619
2176 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2177 argument, don't call default_function_array_conversion
2178 nor c_fully_fold here.
2179 (c_parser_asm_statement): Adjust callers.
2180 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2181 and outputs here, and call default_function_array_conversion
2182 on inputs that don't need to be addressable.
2183
f8a93a2e
JJ
21842012-12-18 Jakub Jelinek <jakub@redhat.com>
2185
2186 PR c/39464
2187 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2188 warning require that both c_common_unsigned_type as well as
2189 c_common_signed_type is the same for both mvl and mvr types.
2190
9771b263
DN
21912012-11-16 Diego Novillo <dnovillo@google.com>
2192
2193 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2194
2195 * c-common.c: Use new vec API in vec.h.
2196 * c-common.h: Likewise.
2197 * c-gimplify.c: Likewise.
2198 * c-pragma.c: Likewise.
2199 * c-pretty-print.c: Likewise.
2200 * c-pretty-print.h: Likewise.
2201 * c-semantics.c: Likewise.
2202 * c-decl.c: Likewise.
2203 * c-parser.c: Likewise.
2204 * c-tree.h: Likewise.
2205 * c-typeck.c: Likewise.
2206
880661a4
JW
22072012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2208
2209 PR c++/54930
2210 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2211
077d1abe
MLI
22122012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2213
2214 PR c/53066
2215 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2216 shadows a function, unless the variable is a function or a
2217 pointer-to-function.
2218
3a785c97
JJ
22192012-10-12 Jakub Jelinek <jakub@redhat.com>
2220
2221 PR c/54381
2222 * c-parser.c (struct c_tree_loc_pair): Removed.
2223 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2224 add location_t * and tree * arguments, fill in array of 3
2225 sizeof_arg trees and corresponding locs.
2226 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2227 c_parser_expr_list callers.
2228 (c_parser_postfix_expression_after_primary): Likewise. Pass
2229 array of 3 sizeof_arg trees and locs (corresponding to first
2230 3 arguments) to sizeof_pointer_memaccess_warning.
2231
703c8606
LC
22322012-10-09 Lawrence Crowl <crowl@google.com>
2233
2234 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2235 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2236 hash table.
2237
5d9de0d0
PC
22382012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2239
2240 PR c++/54194
2241 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2242 call.
2243
a212e43f
MG
22442012-10-09 Marc Glisse <marc.glisse@inria.fr>
2245
2246 PR c++/54427
2247 * c-typeck.c: Include c-common.h.
2248 (enum stv_conv): Moved to c-common.h.
2249 (scalar_to_vector): Moved to c-common.c.
2250 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2251 * Make-lang.in: c-typeck.c depends on c-common.h.
2252
3b78de56
AC
22532012-10-04 Arnaud Charlet <charlet@adacore.com>
2254
2255 * c-decl.c (c_write_global_declarations): Fix handling of
2256 -fdump-ada-spec*.
2257
78c60e3d
SS
22582012-09-30 Sharad Singhai <singhai@google.com>
2259
2260 * c-decl.c (c_write_global_declarations): Use a different method
2261 to determine if the dump has ben initialized.
2262
9f33203d
JM
22632012-09-14 Joseph Myers <joseph@codesourcery.com>
2264
2265 PR c/54552
2266 * c-typeck.c (c_cast_expr): When casting to a type requiring
2267 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2268 c_fully_fold first.
2269
a27d595d
JM
22702012-09-14 Joseph Myers <joseph@codesourcery.com>
2271
2272 PR c/54103
2273 * c-typeck.c (build_unary_op): Pass original argument of
2274 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2275 any C_MAYBE_CONST_EXPR, if it has integer operands.
2276 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2277 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2278 to c_objc_common_truthvalue_conversion, then remove any
2279 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2280 c_objc_common_truthvalue_conversion not
2281 c_common_truthvalue_conversion.
2282 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2283 call note_integer_operands for arguments with integer operands
2284 that are not integer constants.
2285
9feb29df
JJ
22862012-09-13 Jakub Jelinek <jakub@redhat.com>
2287
2288 PR c/54559
2289 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2290 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2291
d409320c
JJ
22922012-08-31 Jakub Jelinek <jakub@redhat.com>
2293
2294 PR c/54428
2295 * c-convert.c (convert): Don't call fold_convert_loc if
2296 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2297 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2298 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2299
6265d07c
JJ
23002012-08-24 Jakub Jelinek <jakub@redhat.com>
2301
2302 PR c/54355
2303 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2304 for nested and empty_ok arguments in the call to
2305 c_parser_declaration_or_fndef.
2306
1a4049e7
JJ
23072012-08-17 Jakub Jelinek <jakub@redhat.com>
2308
2309 * c-tree.h (c_last_sizeof_arg): Declare.
2310 * c-parser.c (struct c_tree_loc_pair): New type.
2311 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2312 non-NULL.
2313 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2314 (c_parser_postfix_expression_after_primary): Likewise. Call
2315 sizeof_pointer_memaccess_warning if needed.
2316 (sizeof_ptr_memacc_comptypes): New function.
2317 * c-typeck.c (c_last_sizeof_arg): New global variable.
2318 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2319
0229aee9
UB
23202012-07-24 Uros Bizjak <ubizjak@gmail.com>
2321
2322 * c-lang.h (lang_decl): Add variable_size GTY option.
2323
7ee2468b
SB
23242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2325
2326 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2327 * Make-lang.in: Fix dependencies.
2328
d4a10d0a
SB
23292012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2330
2331 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2332 and add language Makefile hooks.
2333 * config-lang.in: New file.
2334 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2335 add the required "normal" config-lang.in rules.
2336 * c-lang.h: Moved from gcc/ to here.
2337 * c-tree.h: Likewise.
2338 * c-objc-common.c: Likewise.
2339 * c-objc-common.h: Likewise.
2340 * c-typeck.c: Likewise.
2341 * c-convert.c: Likewise.
2342 * c-lang.c: Likewise.
2343 * c-aux-info.c: Likewise.
2344 * c-errors.c: Likewise.
2345 * gccspec.c: Likewise.
2346 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2347 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2348\f
5624e564 2349Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2350
2351Copying and distribution of this file, with or without modification,
2352are permitted in any medium without royalty provided the copyright
2353notice and this notice are preserved.