]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
re PR c/67495 (#pragma omp atomic ICEs)
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
f4b189d5
JJ
12015-09-09 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/67495
4 * c-parser.c (c_parser_omp_atomic): Use c_parser_cast_expression
5 instead of c_parser_unary_expression. If the result is !lvalue_p,
6 wrap the result of c_fully_fold into NON_LVALUE_EXPR.
7
b2aaf235
MP
82015-09-04 Marek Polacek <polacek@redhat.com>
9
10 PR sanitizer/67279
11 * c-typeck.c (build_binary_op): Don't instrument static initializers.
12
1807ffc1
MS
132015-09-03 Martin Sebor <msebor@redhat.com>
14
15 PR c/66516
8b652e65
JJ
16 * c-typeck.c (convert_arguments, parser_build_unary_op,
17 build_conditional_expr, c_cast_expr, convert_for_assignment,
18 build_binary_op, _objc_common_truthvalue_conversion): Call
1807ffc1
MS
19 reject_gcc_builtin.
20 (c_decl_implicit): Define.
21
d04ff417
MP
222015-09-02 Marek Polacek <polacek@redhat.com>
23
24 PR c/67432
25 * c-parser.c (c_parser_enum_specifier): Give a better error for
26 an empty enum.
27
a79683d5
TS
282015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
29
30 * c-aux-info.c, c-parser.c, c-tree.h: Remove useless typedefs.
31
191a6b94
MP
322015-08-12 Marek Polacek <polacek@redhat.com>
33
34 * c-decl.c (grokdeclarator): Call error_at instead of error and pass
35 LOC to it.
36
420a9d9b
MP
372015-08-03 Marek Polacek <polacek@redhat.com>
38
39 PR c/67088
40 * c-decl.c (check_bitfield_type_and_width): Add location parameter.
41 Use it.
42 (grokdeclarator): Pass LOC down to check_bitfield_type_and_width.
43
992118a1
PP
442015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
45
46 * c-parser.c (c_parser_if_body): Take token_indent_info
47 argument. Call warn_for_misleading_indentation even when the
48 body is a semicolon. Extract token_indent_infos corresponding
49 to the guard, body and next tokens. Adjust call to
50 warn_for_misleading_indentation accordingly.
51 (c_parser_else_body): Likewise.
52 (c_parser_if_statement): Likewise.
53 (c_parser_while_statement): Likewise.
54 (c_parser_for_statement): Likewise.
55
46308474
LFSM
562015-07-28 Luis Felipe Strano Moraes <luis.strano@gmail.com>
57 Manuel López-Ibáñez <manu@gcc.gnu.org>
58
59 * c-decl.c (get_parm_info): Remove static var. Update warning
60 message.
61
05b28fd6
MP
622015-07-27 Marek Polacek <polacek@redhat.com>
63
64 PR c++/66555
65 PR c/54979
66 * c-typeck.c (parser_build_binary_op): Call warn_tautological_cmp.
67
451b5e48
MP
682015-07-20 Marek Polacek <polacek@redhat.com>
69
70 PR c++/55095
71 * c-typeck.c (digest_init): Pass OPT_Wpedantic to pedwarn_init.
72 (build_binary_op): Warn about left shift overflows.
73
1916bcb5
AM
742015-07-09 Andrew MacLeod <amacleod@redhat.com>
75
76 * c-array-notation.c: Adjust includes for flags.h changes.
77 * c-objc-common.c: Likewise.
78
c7131fb2
AM
792015-07-07 Andrew MacLeod <amacleod@redhat.com>
80
81 * c-array-notation.c: Adjust includes.
82 * c-aux-info.c: Likewise.
83 * c-convert.c: Likewise.
84 * c-decl.c: Likewise.
85 * c-errors.c: Likewise.
86 * c-lang.c: Likewise.
87 * c-objc-common.c: Likewise.
88 * c-parser.c: Likewise.
89 * c-typeck.c: Likewise.
90
da2e71c9
MLI
912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
92
93 PR fortran/66605
94 * c-decl.c (finish_function): Call do_warn_unused_parameter.
95
b155cfd9
MP
962015-06-29 Marek Polacek <polacek@redhat.com>
97
98 PR c/66322
99 * c-typeck.c (struct c_switch): Add BOOL_COND_P and OUTSIDE_RANGE_P.
100 (c_start_case): Set BOOL_COND_P and OUTSIDE_RANGE_P. Don't warn
101 about -Wswitch-bool here.
102 (do_case): Update c_add_case_label call.
103 (c_finish_case): Update c_do_switch_warnings call.
104
31521951
MP
1052015-06-27 Marek Polacek <polacek@redhat.com>
106
107 * c-typeck.c: Use VECTOR_TYPE_P throughout.
108
22d03525
MP
1092015-06-26 Marek Polacek <polacek@redhat.com>
110
111 * c-array-notation.c (fix_builtin_array_notation_fn): Use
112 INDIRECT_REF_P.
113 * c-typeck.c (array_to_pointer_conversion): Likewise.
114 (build_unary_op): Likewise.
115 (c_finish_return): Likewise.
116
f0889939
AM
1172015-06-25 Andrew MacLeod <amacleod@redhat.com>
118
119 * c-decl.c: Remove ipa-ref.h and plugin-api.h from include list.
120 * c-parser.c: Likewise.
121
8d67ee55
RS
1222015-06-25 Richard Sandiford <richard.sandiford@arm.com>
123
124 * c-decl.c (detect_field_duplicates_hash): Use nofree_ptr_hash
125 instead of pointer_hash.
126 (detect_field_duplicates): Likewise.
127
0ae9bd27
MP
1282015-06-25 Marek Polacek <polacek@redhat.com>
129
130 * c-array-notation.c: Use VAR_P throughout.
131 * c-decl.c: Likewise.
132 * c-objc-common.c: Likewise.
133 * c-parser.c: Likewise.
134 * c-typeck.c: Likewise.
135
62f9079a
MP
1362015-06-25 Marek Polacek <polacek@redhat.com>
137
138 * c-decl.c: Use is_global_var throughout.
139 * c-parser.c: Likewise.
140 * c-typeck.c: Likewise.
141
abb226c9
AM
1422015-06-17 Andrew MacLeod <amacleod@redhat.com>
143
144 * c-array-notation.c: Do not include input.h, line-map.h or is-a.h.
145 * c-aux-info.c: Likewise.
146 * c-convert.c: Likewise.
147 * c-decl.c: Likewise.
148 * c-errors.c: Likewise.
149 * c-lang.c: Likewise.
150 * c-objc-common.c: Likewise.
151 * c-parser.c: Likewise.
152 * c-typeck.c: Likewise.
153
8cbababc
JH
1542015-06-11 Jan Hubicka <hubicka@ucw.cz>
155
156 PR middle-end/66325
157 * c-decl.c (start_enum): Set TYPE_PACKED consistently among type
158 variants.
159
a0349665
PMR
1602015-06-11 Pierre-Marie de Rodat <derodat@adacore.com>
161
162 * c-decl.c (pop_scope): Register the main translation unit
163 through the new debug hook.
164
13fdf2e2
AM
1652015-06-08 Andrew MacLeod <amacleod@redhat.com>
166
167 * c-array-notation.c : Adjust include files.
168 * c-aux-info.c : Likewise.
169 * c-convert.c : Likewise.
170 * c-decl.c : Likewise.
171 * c-errors.c : Likewise.
172 * c-lang.c : Likewise.
173 * c-lang.h : Likewise.
174 * c-objc-common.c : Likewise.
175 * c-parser.c : Likewise.
176 * c-typeck.c : Likewise.
177
d7438551
AH
1782015-06-05 Aldy Hernandez <aldyh@redhat.com>
179
180 * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and
181 immediately clobber it.
182 (c_write_global_declarations_1): Remove call to
183 check_global_declaration_1.
184 (c_write_global_declarations_2): Remove.
185 (c_write_final_cleanups): Rename from c_write_global_declarations.
186 Remove call to finalize_compilation_unit.
187 Remove calls to debugging hooks.
188 * c-objc-common.c: Adjust comment for c_warn_unused_global_decl.
189 * c-objc-common.h: Remove LANG_HOOKS_WRITE_GLOBALS.
190 * c-tree.h: Remove c_write_global_declarations.
191
ecb9f223
AM
1922015-06-04 Andrew MacLeod <amacleod@redhat.com>
193
194 * c-array-notation.c: Adjust includes for restructured coretypes.h.
195 * c-aux-info.c: Likewise.
196 * c-convert.c: Likewise.
197 * c-decl.c: Likewise.
198 * c-errors.c: Likewise.
199 * c-lang.c: Likewise.
200 * c-objc-common.c: Likewise.
201 * c-parser.c: Likewise.
202 * c-typeck.c: Likewise.
203
9482b620
MP
2042015-06-04 Marek Polacek <polacek@redhat.com>
205
206 PR c/66341
207 * c-typeck.c (build_c_cast): Wrap VALUE into NON_LVALUE_EXPR if
208 it is a lvalue.
209
bc51ace3
PK
2102015-06-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
211
212 * c-decl.c (warn_cxx_compat_finish_struct): New parameters code, record_loc.
213 Warn for empty struct.
214 (finish_struct): Pass TREE_CODE(t) and loc to warn_cxx_compat_finish_struct.
215
ea5b45b6
AT
2162015-06-02 Andres Tiraboschi <andres.tiraboschi@tallertechnologies.com>
217
218 * c-decl.c (start_function): Call plugin before parsing.
219 (finish_function): Call plugin after parsing.
220
c2d47482
PK
2212015-06-02 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
222
223 PR c/49551
224 * c-decl.c (merge_decls): Merge DECL_COMMON.
225
a95492ab
JW
2262015-05-22 Jim Wilson <jim.wilson@linaro.org>
227
228 * Make-lang.in (check_gcc_pallelize): Define.
229
fd5c817a
MP
2302015-05-22 Marek Polacek <polacek@redhat.com>
231
232 PR c/47043
233 * c-parser.c (c_parser_enum_specifier): Parse and apply enumerator
234 attributes.
235
c7b70a3c
MP
2362015-05-21 Marek Polacek <polacek@redhat.com>
237
238 * c-typeck.c (inform_declaration): Use DECL_IS_BUILTIN instead of
239 DECL_BUILT_IN.
240
21b634ae
MP
2412015-05-20 Marek Polacek <polacek@redhat.com>
242
243 * c-decl.c: Use VAR_OR_FUNCTION_DECL_P throughout.
244 * c-typeck.c: Likewise.
245
296a8c2f
MP
2462015-05-19 Marek Polacek <polacek@redhat.com>
247
248 * c-typeck.c (start_init): Use AGGREGATE_TYPE_P.
249
41b37d5e
JJ
2502015-05-19 Jakub Jelinek <jakub@redhat.com>
251
252 PR middle-end/66199
253 * c-parser.c (c_parser_omp_for_loop): Don't add
254 OMP_CLAUSE_SHARED to OMP_PARALLEL_CLAUSES when moving
255 OMP_CLAUSE_LASTPRIVATE clause to OMP_FOR_CLAUSES.
256 (c_parser_omp_teams): Set OMP_TEAMS_COMBINED for combined
257 constructs.
258
fab27f52
MM
2592015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
260
261 * c-typeck.c (build_array_ref): Use std::swap instead of explicit
296a8c2f 262 swaps.
fab27f52 263
40de31cf
MLI
2642015-05-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
265
266 PR fortran/44054
267 * c-objc-common.c (c_tree_printer): Replace locus pointer with
268 accessor function.
269
3aa3c9fc
MP
2702015-05-14 Marek Polacek <polacek@redhat.com>
271
272 PR c/66066
273 PR c/66127
274 * c-typeck.c (digest_init): Call pedwarn_init with OPT_Wpedantic
275 rather than with 0.
276
c3388e62
DM
2772015-05-12 David Malcolm <dmalcolm@redhat.com>
278
279 * c-parser.c (c_parser_if_body): Add param "if_loc", use it
280 to add a call to warn_for_misleading_indentation.
281 (c_parser_else_body): Likewise, adding param "else_loc".
282 (c_parser_if_statement): Check for misleading indentation.
283 (c_parser_while_statement): Likewise.
284 (c_parser_for_statement): Likewise.
285
755e528f
MP
2862015-05-08 Marek Polacek <polacek@redhat.com>
287
288 PR c/64918
289 * c-typeck.c (add_pending_init): Use OPT_Woverride_init_side_effects.
290 (output_init_element): Likewise.
291
0173bd2a
MP
2922015-05-07 Marek Polacek <polacek@redhat.com>
293
294 PR c/65179
295 * c-typeck.c (build_binary_op): Warn when left shifting a negative
296 value.
297
9babc352
MP
2982015-04-30 Marek Polacek <polacek@redhat.com>
299
300 * c-typeck.c (set_init_label): Call error_at instead of error and
301 pass LOC to it.
302
ac9f18db
MP
303 * c-typeck.c (c_incomplete_type_error): Refactor to use %qT. Print
304 the type of a decl.
305
ec3fba51
MP
306 * c-typeck.c (c_build_va_arg): Clarify the error message.
307
b811915d
TS
3082015-04-29 Thomas Schwinge <thomas@codesourcery.com>
309
310 * c-parser.c (c_parser_oacc_enter_exit_data): Use
311 OMP_STANDALONE_CLAUSES.
312
f3075008
MP
3132015-04-28 Marek Polacek <polacek@redhat.com>
314
315 * c-parser.c (c_parser_binary_expression): Remove duplicate line.
316
4e81b788
MP
3172015-04-28 Marek Polacek <polacek@redhat.com>
318
319 PR c/65901
320 * c-typeck.c (c_build_va_arg): Require TYPE be a complete type.
321
6c1db78e
MP
3222015-04-25 Marek Polacek <polacek@redhat.com>
323
324 PR c/52085
325 * c-decl.c (finish_enum): Copy over TYPE_ALIGN. Also check for "mode"
326 attribute.
327
5c4abbb8
MP
3282015-04-23 Marek Polacek <polacek@redhat.com>
329
330 PR c/65345
331 * c-decl.c (set_labels_context_r): New function.
332 (store_parm_decls): Call it via walk_tree_without_duplicates.
333 * c-typeck.c (convert_lvalue_to_rvalue): Use create_tmp_var_raw
334 instead of create_tmp_var. Build TARGET_EXPR instead of
335 COMPOUND_EXPR.
336 (build_atomic_assign): Use create_tmp_var_raw instead of
337 create_tmp_var. Build TARGET_EXPRs instead of MODIFY_EXPR.
338
06aca1d5
IV
3392015-04-20 Ilya Verbin <ilya.verbin@intel.com>
340
341 * c-parser.c (c_parser_oacc_enter_exit_data): Remove excess semicolon.
342 (c_parser_omp_target_update): Add missed %> to error_at ().
343
8fba1830
BRF
3442015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
345
346 PR target/55143
347 * c-decl.c (c_default_pointer_mode): Remove definition.
348 * c-tree.h (c_default_pointer_mode): Remove declaration.
349
62021f64
TB
3502015-03-27 Tobias Burnus <burnus@net-b.de>
351
352 PR c/65586
353 * c-parser.c (c_parser_skip_to_pragma_eol): Optionally, don't
354 error out.
355 (c_parser_omp_for, c_parser_omp_parallel, c_parser_omp_distribute,
356 c_parser_omp_teams, c_parser_omp_target, c_parser_omp_declare):
357 Update calls to not error for skipped omp pragmas with -fopenmp-simd.
358
9b65e171
JJ
3592015-03-19 Jakub Jelinek <jakub@redhat.com>
360
361 * c-decl.c (c_decl_attributes): Also add "omp declare target"
362 attribute for DECL_EXTERNAL VAR_DECLs.
363
17958621
JJ
3642015-03-11 Jakub Jelinek <jakub@redhat.com>
365
366 * c-parser.c (c_parse_init): Don't call xstrdup on get_identifier
367 argument.
368
7ccb1a11
JJ
3692015-03-10 Jakub Jelinek <jakub@redhat.com>
370
371 PR c/65120
372 * c-typeck.c (parser_build_binary_op): Check for tcc_comparison
373 before preparing arguments to warn_logical_not_parentheses.
374
01177669
JJ
3752015-03-09 Jakub Jelinek <jakub@redhat.com>
376
377 PR c/65120
378 * c-typeck.c (parser_build_binary_op): Don't warn for
379 !!x == y or !b == y where b is _Bool.
380
802ac282
MP
3812015-03-09 Marek Polacek <polacek@redhat.com>
382
383 * c-convert.c (convert): Make use of do_ubsan_in_current_function.
384 * c-decl.c (grokdeclarator): Likewise.
385 * c-typeck.c (build_binary_op): Likewise.
386
e5165b60
MP
3872015-02-27 Marek Polacek <polacek@redhat.com>
388
389 PR c/65228
390 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
391
065d214c
MP
3922015-02-14 Marek Polacek <polacek@redhat.com>
393
394 PR c/64768
395 * c-decl.c (grokdeclarator): Set the range of a flexible array member
396 declared through a typedef name.
397
e5d9235b
MP
3982015-02-13 Marek Polacek <polacek@redhat.com>
399
400 PR c/65050
401 * c-decl.c (grokdeclarator): Print also the type when giving
402 the error message about array's incomplete element type.
403
fa01ffcc
JJ
4042015-02-11 Jakub Jelinek <jakub@redhat.com>
405
406 PR c/64824
407 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
408 check in the POP macro.
409
c3e38a03
MP
4102015-02-09 Marek Polacek <polacek@redhat.com>
411
412 PR c/64856
413 * c-typeck.c (process_init_element): Don't always wrap
414 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
415 initializing a range of elements.
416
4886ec8e
JJ
4172015-02-04 Jakub Jelinek <jakub@redhat.com>
418
419 PR c/64824
420 PR c/64868
421 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
422
c3e38a03 4232015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
424
425 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
426 processing enum declaration.
427
7b33f0c8
MP
4282015-01-29 Marek Polacek <polacek@redhat.com>
429
430 PR c/64709
431 * c-typeck.c (pop_init_level): If constructor_elements has
432 exactly one element with integer_zerop value, set constructor_zeroinit
433 to 1. Remove braces around warning_init call.
434
dea63e49
JJ
4352015-01-27 Jakub Jelinek <jakub@redhat.com>
436
437 PR c/64766
438 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
439 of FUNCTION_DECLs with error_mark_node.
440
d38f7dce
JJ
4412015-01-26 Jakub Jelinek <jakub@redhat.com>
442
443 PR c/64778
444 * c-typeck.c (convert_arguments): Return -1 if there are
445 error_args, even if we've diagnosed too many arguments.
446
cbf5d0e7
RB
4472015-01-21 Richard Biener <rguenther@suse.de>
448
449 PR middle-end/64313
450 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
451 for builtins the user declared correctly.
452
41dbbb37
TS
4532015-01-15 Thomas Schwinge <thomas@codesourcery.com>
454 Bernd Schmidt <bernds@codesourcery.com>
455 Cesar Philippidis <cesar@codesourcery.com>
456 James Norris <jnorris@codesourcery.com>
457 Jakub Jelinek <jakub@redhat.com>
458 Ilmir Usmanov <i.usmanov@samsung.com>
459
460 * c-parser.c: Include "gomp-constants.h".
461 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
462 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
463 Use OMP_CLAUSE_SET_MAP_KIND.
464 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
465 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
466 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
467 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
468 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
469 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
470 "copyout", "create", "delete", "deviceptr", "gang", "host",
471 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
472 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
473 "present_or_create", "pcreate", "seq", "self", "vector",
474 "vector_length", "wait", "worker".
475 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
476 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
477 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
478 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
479 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
480 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
481 (c_parser_oacc_data_clause_deviceptr)
482 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
483 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
484 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
485 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
486 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
487 (c_parser_oacc_parallel, c_parser_oacc_update)
488 (c_parser_oacc_wait): New functions.
489 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
490 (c_finish_oacc_data): New prototypes.
491 * c-typeck.c: Include "gomp-constants.h".
492 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
493 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
494 OMP_CLAUSE_SET_MAP_KIND.
495 (c_finish_oacc_parallel, c_finish_oacc_kernels)
496 (c_finish_oacc_data): New functions.
497 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
498 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
499 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
500 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
501 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
502 GOMP_MAP_FORCE_DEVICEPTR.
503
adfac8df
JJ
5042015-01-09 Michael Collison <michael.collison@linaro.org>
505
506 * c-array-notation.c: Include hash-set.h, machmode.h,
507 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
508 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
509 * c-aux-info.c: Ditto.
510 * c-convert.c: Ditto.
511 * c-decl.c: Ditto.
512 * c-errors.c: Ditto.
513 * c-lang.c: Dittoxs.
514 * c-objc-common.c: Ditto.
515 * c-parser.c: Ditto.
516 * c-typeck.c: Include hash-set.h, machmode.h,
517 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
518 fold-const.h, wide-int.h, inchash.h, real.h and
519 fixed-value.h due to flattening of tree.h.
520
2cc901dc
MP
5212015-01-07 Marek Polacek <polacek@redhat.com>
522
523 PR c/64417
524 * c-typeck.c (process_init_element): Disallow initialization of
525 a flexible array member with a string constant if the structure
526 is in an array.
527
5624e564
JJ
5282015-01-05 Jakub Jelinek <jakub@redhat.com>
529
e5341100
JJ
530 PR sanitizer/64344
531 * c-typeck.c (convert_for_assignment, c_finish_return): For
532 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
533 types also set in_late_binary_op around convert call.
534 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
535 to integral type casts, if not in_late_binary_op, pass c_fully_fold
536 result on expr as last argument to ubsan_instrument_float_cast,
537 if in_late_binary_op, don't use c_save_expr but save_expr.
538
5624e564
JJ
539 Update copyright years.
540
5bd012f8
MP
5412015-01-05 Marek Polacek <polacek@redhat.com>
542
543 PR c/64423
544 * c-typeck.c (build_array_ref): Pass loc down to
545 warn_array_subscript_with_type_char.
546
768952be
MU
5472014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
548
549 * c-typeck.c: New behavious for pointers to arrays with qualifiers
550 (common-pointer-type): For pointers to arrays take qualifiers from
551 element type.
552 (build_conditional_expr): Add warnings for lost qualifiers.
553 (comp-target-types): Allow pointers to arrays with different qualifiers.
554 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
555 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
556 to PEDWARN_FOR_QUALIFIERS.
557
8f94a8c4
JJ
5582014-12-17 Jakub Jelinek <jakub@redhat.com>
559
560 PR sanitizer/64289
561 * c-convert.c: Include ubsan.h.
562 (convert): For real -> integral casts and
563 -fsanitize=float-cast-overflow don't call convert_to_integer, but
564 instead instrument the float cast directly.
565
b731b390
JJ
5662014-11-29 Jakub Jelinek <jakub@redhat.com>
567
568 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
569 c_finish_stmt_expr): Remove NULL last argument from
570 create_tmp_var_raw and create_tmp_var calls.
571 * c-array-notation.c (fix_builtin_array_notation_fn,
572 build_array_notation_expr, fix_conditional_array_notations_1,
573 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
574
541e35a6
MP
5752014-11-28 Marek Polacek <polacek@redhat.com>
576
577 PR c/63862
578 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
579 convert the right operand to integer type.
580
b286be94
MP
5812014-11-25 Marek Polacek <polacek@redhat.com>
582
583 PR c/63877
584 * c-decl.c (start_function): Disable -Wmissing-declarations warning
585 for inline functions.
586
aa7da51a
JJ
5872014-11-21 Jakub Jelinek <jakub@redhat.com>
588
589 PR target/63764
590 * c-typeck.c (build_array_ref): Adjust
591 convert_vector_to_pointer_for_subscript caller. If it returns true,
592 call non_lvalue_loc on the result.
593
d876207f
RB
5942014-11-11 Richard Biener <rguenther@suse.de>
595
596 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
597 to true.
598
e5e44252
AK
5992014-11-10 Andi Kleen <ak@linux.intel.com>
600
601 PR c/60804
602 * c-parser.c (c_parser_statement_after_labels): Call
603 check_no_cilk.
604 (c_parser_if_statement): Dito.
605 (c_parser_switch_statement): Dito.
606 (c_parser_while_statement): Dito.
607 (c_parser_do_statement): Dito.
608 (c_parser_for_statement): Dito.
609 * c-typeck.c (c_finish_loop): Dito.
610
13c21655
PC
6112014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
612
613 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
614 OPT_Wshift_count_overflow in the warnings.
615
2d51fcef
MP
6162014-10-30 Marek Polacek <polacek@redhat.com>
617
618 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
619 print the stripped version as well, if they're not the same.
620
ef4bddc2
RS
6212014-10-29 Richard Sandiford <richard.sandiford@arm.com>
622
623 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
624 machine_mode.
625
c582198b
AM
6262014-10-28 Andrew MacLeod <amacleod@redhat.com>
627
628 * c-decl.c: Adjust include files.
629 * c-parser.c: Ditto.
630
ddc8de03
PM
6312014-10-27 Phil Muldoon <pmuldoon@redhat.com>
632 Tom Tromey <tromey@redhat.com>
633
634 * c-tree.h (enum c_oracle_request): New.
635 (c_binding_oracle_function): New typedef.
636 (c_binding_oracle, c_pushtag, c_bind): Declare.
637 * c-decl.c (c_binding_oracle): New global.
638 (I_SYMBOL_CHECKED): New macro.
639 (i_symbol_binding): New function.
640 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
641 (I_TAG_CHECKED): New macro.
642 (i_tag_binding): New function.
643 (I_TAG_BINDING, I_TAG_DECL): Redefine.
644 (I_LABEL_CHECKED): New macro.
645 (i_label_binding): New function.
646 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
647 (c_print_identifier): Save and restore c_binding_oracle.
648 (c_pushtag, c_bind): New functions.
649
60393bbc
AM
6502014-10-27 Andrew MacLeod <amacleod@redhat.com>
651
652 * c-typeck.c: Adjust include files.
653
d723bb7c
MLI
6542014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
655
656 PR c++/53061
657 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
658 initialization here...
659 (c_initialize_diagnostics): ... but here. Set defaults after
660 building pretty-printer.
661
1bc5a451
MP
6622014-10-23 Marek Polacek <polacek@redhat.com>
663
664 PR c/63626
665 * c-decl.c (pop_scope): Don't print warning in external_scope.
666
4435bb92
MP
6672014-10-19 Marek Polacek <polacek@redhat.com>
668
669 PR c/63567
670 * c-typeck.c (output_init_element): Allow initializing objects with
671 static storage duration with compound literals even in C99 and add
672 pedwarn for it.
673
7278465e
MP
6742014-10-17 Marek Polacek <polacek@redhat.com>
675
676 PR c/63567
677 * c-typeck.c (digest_init): Allow initializing objects with static
678 storage duration with compound literals even in C99 and add pedwarn
679 for it.
680
d9b7be2e
MP
6812014-10-17 Marek Polacek <polacek@redhat.com>
682
683 PR c/63543
684 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
685 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
686 error multiple times. Print the type.
687
f406ae1f
MP
6882014-10-17 Marek Polacek <polacek@redhat.com>
689
690 PR c/63549
691 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
692 type.
693
92574c7c
MP
6942014-10-17 Marek Polacek <polacek@redhat.com>
695
696 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
697 (start_function): Use OPT_Wimplicit_int instead of 0.
698 (store_parm_decls_oldstyle): Likewise.
699
1bc4a978
MT
7002014-10-17 Alan Modra <amodra@gmail.com>
701
702 PR middle-end/61848
703 * c-decl.c (merge_decls): Don't merge section name or tls model
704 to newdecl symtab node, instead merge to olddecl. Override
705 existing olddecl section name. Set tls_model for all thread-local
706 vars, not just OMP thread-private ones. Remove incorrect comment.
707
83685514
AM
7082014-10-16 Andrew MacLeod <amacleod@redhat.com>
709
710 * c-decl.c: Adjust include files.
711
78a7c317
DD
7122014-10-14 DJ Delorie <dj@redhat.com>
713
714 * c-parser.c (c_parse_init): Add RID entries for each __intN.
715 (c_token_starts_typename): Check all __intN, not just __int128.
716 (c_token_starts_declspecs): Likewise.
717 (c_parser_declspecs): Likewise.
718 (c_parser_attribute_any_word): Likewise.
719 (c_parser_objc_selector): Likewise.
720 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
721 (struct c_declspecs): Add int_n_idx field to record *which* __intN
722 is specified.
723 * c-decl.c (declspecs_add_type): Check for all __intN, not just
724 __int128.
725 (finish_declspecs): Likewise.
726
74d98c1e
AB
7272014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
728
729 * c-parser.c (c_parser_all_labels): New function to replace
730 the duplicate code.
731 (c_parser_statement): Call the new function.
732
84937de2
MP
7332014-10-09 Marek Polacek <polacek@redhat.com>
734
735 PR c/63480
736 * c-typeck.c (pop_init_level): Don't warn about initializing
737 with { }.
738
0382aaa0
MP
7392014-10-07 Marek Polacek <polacek@redhat.com>
740
741 PR c/59717
742 * c-decl.c (header_for_builtin_fn): New function.
743 (implicitly_declare): Suggest which header to include.
744
7a0ca710
MP
7452014-10-07 Marek Polacek <polacek@redhat.com>
746
747 * c-convert.c (convert): Use error_operand_p.
748 * c-typeck.c (require_complete_type): Likewise.
749 (really_atomic_lvalue): Likewise.
750 (digest_init): Likewise.
751 (handle_omp_array_sections_1): Likewise.
752
6bc8a126
MP
7532014-10-03 Marek Polacek <polacek@redhat.com>
754
755 PR c/63453
756 * c-decl.c (pop_scope): Don't warn about "inline function declared
757 but never defined" for functions marked with gnu_inline attribute.
758
d90c0a59
JJ
7592014-09-25 Jakub Jelinek <jakub@redhat.com>
760
761 PR c++/63249
762 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
763 on low_bound and length.
764
083e891e
MP
7652014-09-24 Marek Polacek <polacek@redhat.com>
766
767 PR c/61405
768 PR c/53874
769 * c-parser.c: Don't define CPP_KEYWORD.
770 (c_parser_switch_statement): Pass original type to c_finish_case.
771 * c-tree.h (c_finish_case): Update declaration.
772 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
773 conditionally to c_do_switch_warnings.
774
8d95fe25
MP
7752014-09-03 Marek Polacek <polacek@redhat.com>
776
777 PR c/62024
778 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
779 conversions.
780
9a771876
JJ
7812014-09-02 Jakub Jelinek <jakub@redhat.com>
782 Balaji V. Iyer <balaji.v.iyer@intel.com>
783 Igor Zamyatin <igor.zamyatin@intel.com>
784
785 * c-parser.c (c_parser_cilk_for): New function.
786 (c_parser_cilk_grainsize): Likewise.
787 (c_get_temp_regvar): Likewise.
788 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
789 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
790 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
791 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
792 case.
793
b7679d96
CG
7942014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
795
796 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
797 with using HOST_WIDE_INT without truncation to 'int'
798
59ea0364
MP
7992014-08-22 Marek Polacek <polacek@redhat.com>
800
801 PR c++/62199
802 * c-typeck.c (parser_build_binary_op): Adjust call to
803 warn_logical_not_parentheses.
804
671a475e
IZ
8052014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
806
807 PR other/62008
808 * c-parser.c (c_parser_array_notation): Check for correct
809 type of an array added.
810
04159acf
MP
8112014-08-19 Marek Polacek <polacek@redhat.com>
812
813 PR c++/62153
814 * c-typeck.c (build_binary_op): If either operand of a comparison
815 is a boolean expression, call maybe_warn_bool_compare.
816
c77935ee
PP
8172014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
818
819 PR c/45584
820 * c-typeck.c (build_c_cast): Do a conversion even when the
821 TYPE_MAIN_VARIANTs are the same.
822
35aff4fb
MP
8232014-08-19 Marek Polacek <polacek@redhat.com>
824
825 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
826 pedwarn_c99 instead of pedwarn.
827 (grokfield): Likewise.
828 (warn_defaults_to): New function.
829 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
830 Unconditionally call pedwarn_c99 instead of pedwarn.
831 (start_function): Call warn_defaults_to instead of pedwarn_c99.
832 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
833 check flag_isoc11 before.
834 * c-errors.c (pedwarn_c99): Change the return type to bool.
835 Handle -Wc99-c11-compat.
836 * c-parser.c (disable_extension_diagnostics): Handle
837 warn_c99_c11_compat.
838 (restore_extension_diagnostics): Likewise.
839 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
840 instead of pedwarn, don't check flag_isoc11 before.
841 (c_parser_declspecs): Likewise.
842 (c_parser_alignas_specifier): Likewise.
843 (c_parser_alignof_expression): Likewise.
844 (c_parser_generic_selection): Likewise.
845 * c-tree.h (pedwarn_c99): Update declaration.
846 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
847 of pedwarn_c99.
848
177cce46
MP
8492014-08-19 Marek Polacek <polacek@redhat.com>
850
851 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
852 to pedwarn_c90.
853 * c-errors.c: Include "opts.h".
854 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
855 * c-parser.c (disable_extension_diagnostics): Handle negative value
856 of warn_c90_c99_compat, too.
857 (restore_extension_diagnostics): Likewise.
858 (c_parser_compound_statement_nostart): Pass
859 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
860
6dc99c33
MP
8612014-08-12 Marek Polacek <polacek@redhat.com>
862
863 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
864 Add pedwarn.
865 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
866 Likewise.
867 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
868
f3bede71
MP
8692014-08-10 Marek Polacek <polacek@redhat.com>
870
871 PR c/51849
872 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
873 Call pedwarn_c90 instead of pedwarn.
874 (check_bitfield_type_and_width): Likewise.
875 (declspecs_add_qual): Likewise.
876 (declspecs_add_type): Likewise.
877 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
878 Adjust to only call pedwarn_c90.
879 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
880 pedwarn_c90 instead of pedwarn.
881 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
882 * c-parser.c (disable_extension_diagnostics): Handle
883 warn_c90_c99_compat.
884 (restore_extension_diagnostics): Likewise.
885 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
886 pedwarn_c90 instead of pedwarn.
887 (c_parser_initelt): Likewise.
888 (c_parser_postfix_expression): Likewise.
889 (c_parser_postfix_expression_after_paren_type): Likewise.
890 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
891 * c-tree.h: Fix formatting.
892 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
893 pedwarn_c90 instead of pedwarn.
894
9f25a338
TS
8952014-08-07 Trevor Saunders <tsaunders@mozilla.com>
896
897 * c-typeck.c: Remove include of pointer-set.h.
898
044331a8
MP
8992014-08-07 Marek Polacek <polacek@redhat.com>
900
901 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
902
b787e7a2
TS
9032014-08-02 Trevor Saunders <tsaunders@mozilla.com>
904
905 * c-typeck.c: Use hash_map instead of pointer_map.
906
6e2830c3
TS
9072014-08-02 Trevor Saunders <tsaunders@mozilla.com>
908
909 * c-decl.c: Use hash_set instead of pointer_set.
910
a7ee52fb
IZ
9112014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
912
913 PR middle-end/61455
914 * c-array-notation.c (expand_array_notations): Handling
915 of DECL_EXPR added.
916
b4dfdc11
MG
9172014-07-31 Marc Glisse <marc.glisse@inria.fr>
918
919 PR c++/60517
920 * c-typeck.c (c_finish_return): Return 0 instead of the address of
921 a local variable.
922
976d5a22
TT
9232014-07-30 Tom Tromey <tromey@redhat.com>
924
925 * c-typeck.c (struct constructor_stack) <designator_depth>: New
926 field.
927 (really_start_incremental_init, push_init_level): Initialize
928 designator_depth.
929 (pop_init_level): Set global designator_depth.
930 (process_init_element): Check for designated_init attribute.
931
30281de2
MP
9322014-07-20 Marek Polacek <polacek@redhat.com>
933
934 PR c/61852
935 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
936 (implicitly_declare): Pass location to implicit_decl_warning.
937
b108f48f
JJ
9382014-07-14 Jakub Jelinek <jakub@redhat.com>
939
940 PR middle-end/61294
941 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
942 If non-NULL, call c_parser_check_literal_zero.
943 (c_parser_check_literal_zero): New function.
944 (c_parser_postfix_expression_after_primary): Adjust
945 c_parser_expr_list caller, handle -Wmemset-transposed-args.
946
773ec47f
MP
9472014-07-06 Marek Polacek <polacek@redhat.com>
948
949 PR c/6940
950 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
951 * c-tree.h (C_ARRAY_PARAMETER): Define.
952 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
953 function parameter.
954
22e1cf1c
JH
9552014-07-02 Jan Hubicka <hubicka@ucw.cz>
956 Chen Gang <gang.chen.5i5j@gmail.com>
957
958 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
959 releasing symbol.
960
52ec0ea3
MP
9612014-07-01 Marek Polacek <polacek@redhat.com>
962
963 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
964 instead of 0 to WARN_FOR_ASSIGNMENT.
965
d5c3d343
MP
9662014-07-01 Marek Polacek <polacek@redhat.com>
967
968 PR c/58286
969 * c-typeck.c (convert_for_assignment): Pass
970 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
971
6a7253a4
MP
9722014-06-30 Marek Polacek <polacek@redhat.com>
973
974 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
975 has no_sanitize_undefined attribute.
976
5e88a8f4
IZ
9772014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
978
979 PR middle-end/57541
980 * c-array-notation.c (fix_builtin_array_notation_fn):
981 Check for 0 arguments in builtin call. Check that bultin argument is
982 correct.
983 * c-parser.c (c_parser_array_notation): Check for incorrect initial
984 index.
985
9698b078
SH
9862014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
987
988 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
989 qualifiers in __auto_type for atomic types.
990 (c_parser_typeof_specifier): Discard all type qualifiers in
991 __typeof__ for atomic types.
992
6e07c515
MP
9932014-06-25 Marek Polacek <polacek@redhat.com>
994
995 PR c/61162
996 * c-parser.c (c_parser_statement_after_labels): Pass the location of
997 the return expression to c_finish_return.
998
da6f124d
JJ
9992014-06-25 Jakub Jelinek <jakub@redhat.com>
1000
1001 * c-typeck.c (c_finish_omp_clauses): Make sure
1002 OMP_CLAUSE_LINEAR_STEP has correct type.
1003
c203e8a7
TS
10042014-06-24 Trevor Saunders <tsaunders@mozilla.com>
1005
1006 * c-decl.c: Adjust.
1007
56ad0e38
JJ
10082014-06-24 Jakub Jelinek <jakub@redhat.com>
1009
1010 * c-parser.c (c_parser_omp_for_loop): For
1011 #pragma omp parallel for simd move lastprivate clause from parallel
1012 to for rather than simd.
1013
47c2554f
MP
10142014-06-23 Marek Polacek <polacek@redhat.com>
1015
1016 * c-typeck.c (parser_build_binary_op): Don't call
1017 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
1018
56363ffd
JH
10192014-06-15 Jan Hubicka <hubicka@ucw.cz>
1020
1021 * c-parser.c (c_parser_omp_threadprivate): Likewise.
1022 * c-decl.c (merge_decls): Likewise.
1023
d7ff7ae5
MP
10242014-06-09 Marek Polacek <polacek@redhat.com>
1025
1026 PR c/36446
1027 * c-typeck.c (error_init): Call inform instead of error_at.
1028 (pedwarn_init): Call inform instead of pedwarn.
1029 (warning_init): Call inform instead of warning_at.
1030
24d047a3
JH
10312014-06-07 Jan Hubicka <hubicka@ucw.cz>
1032
1033 * c-decl.c (merge_decls): Use set_decl_section_name.
1034 (duplicate_decls): Remove node if it exists.
1035
9bac5cbb
G
10362014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
1037
1038 PR c/53119
1039 * c-typeck.c (push_init_level, process_init_element,
1040 pop_init_level): Correct check for zero initialization, move
1041 missing brace warning to respect zero initialization.
1042
8ffcdea8
MP
10432014-06-05 Marek Polacek <polacek@redhat.com>
1044
1045 PR c/56724
1046 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
1047
742938c9
MP
10482014-06-05 Marek Polacek <polacek@redhat.com>
1049
1050 PR c/49706
1051 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
1052 on the left hand side operand of a comparison.
1053
6447c55d
MP
10542014-06-05 Marek Polacek <polacek@redhat.com>
1055
1056 PR c/48062
1057 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
1058 Print note only if the warning was printed.
1059
9dc7743c
IZ
10602014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
1061
1062 PR c/58942
1063 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
1064 with a pointer.
1065
fedfecef
MP
10662014-06-03 Marek Polacek <polacek@redhat.com>
1067
1068 PR c/60439
1069 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
1070 c_start_case.
1071 * c-tree.h (c_start_case): Update.
1072 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
1073 switch condition has boolean value.
1074
9b2b7279
AM
10752014-06-02 Andrew MacLeod <amacleod@redhat.com>
1076
1077 * c-decl.c: Include builtins.h.
1078 * c-parser.c: Likewise.
1079
5c1bc275
MP
10802014-05-27 Marek Polacek <polacek@redhat.com>
1081
1082 PR c/56724
1083 * c-typeck.c (convert_arguments): Get location of a parameter. Change
1084 error and warning calls to error_at and warning_at. Pass location of
1085 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
1086 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
1087 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
1088
97563bc8
IZ
10892014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
1090
1091 PR c/61191
1092 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
1093 function parameters.
1094
aede2c10
JH
10952014-05-23 Jan Hubicka <hubicka@ucw.cz>
1096
1097 * c-decl.c (merge_decls): Preserve symtab node pointers.
1098 (duplicate_decls): Free new decl.
1099
edbba2ce
TS
11002014-05-23 Thomas Schwinge <thomas@codesourcery.com>
1101
f3316c6d
TS
1102 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
1103 initialization.
1104
edbba2ce
TS
1105 * c-parser.c (c_parser_omp_target): Return bool values.
1106
68c81f24
TS
11072014-05-22 Thomas Schwinge <thomas@codesourcery.com>
1108
1109 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
1110 num_teams_loc variable to num_thread_limit_loc.
1111
632f2871
RS
11122014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
1113
1114 * c-array-notation.c (expand_array_notations): Use void_node
1115 instead of void_zero_node.
1116
766090c2
TS
11172014-05-17 Trevor Saunders <tsaunders@mozilla.com>
1118
1119 * c-decl.c (finish_struct): Adjust.
1120 (finish_enum): Likewise.
1121 (bind): Adjust.
1122 (record_inline_static): Likewise.
1123 (push_scope): Likewise.
1124 (make_label): Likewise.
1125 (lookup_label_for_goto): Likewise.
1126 (finish_struct): Likewise.
1127 (finish_enum): Likewise.
1128 (store_parm_decls): Likewise.
1129 (c_push_function_context): Likewise.
1130 * c-lang.h: Remove usage of variable_size gty attribute.
1131 * c-parser.c (c_parse_init): Adjust.
1132 (c_parse_file): Likewise.
1133
2b107f6b
MP
11342014-05-13 Marek Polacek <polacek@redhat.com>
1135
1136 PR c/61162
1137 * c-typeck.c (convert_for_assignment): Pass location to
1138 WARN_FOR_ASSIGNMENT instead of input_location.
1139
d033409e
MP
11402014-05-10 Marek Polacek <polacek@redhat.com>
1141
1142 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
1143 maybe_warn_string_init.
1144 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
1145 maybe_warn_string_init.
1146 * c-tree.h (maybe_warn_string_init): Update declaration.
1147 * c-typeck.c (maybe_warn_string_init): Add location parameter.
1148 Call pedwarn_init with loc instead of with input_location.
1149 (digest_init): Pass init_loc to maybe_warn_string_init.
1150 (pop_init_level): Call pedwarn_init with loc instead of with
1151 input_location.
1152 (set_init_index): Likewise.
1153 (process_init_element): Likewise.
1154
ea58ef42
MP
11552014-05-09 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/61096
1158 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
1159 (c_parser_initelt): Pass location to set_init_label. Pass array index
1160 location to set_init_index.
1161 * c-tree.h (push_init_level): Update declaration.
1162 (pop_init_level): Likewise.
1163 (set_init_index): Likewise.
1164 (set_init_label): Likewise.
1165 * c-typeck.c (error_init): Add location parameter. Call error_at
1166 instead of error.
1167 (digest_init): Pass init_loc to error_init.
1168 (really_start_incremental_init):
1169 (push_init_level): Add location parameter. Pass loc to pop_init_level
1170 and error_init.
1171 (pop_init_level): Likewise.
1172 (set_designator): Add location parameter. Pass loc to pop_init_level,
1173 push_init_level, and error_init.
1174 (set_init_index): Add location parameter. Pass loc to error_init and
1175 set_designator.
1176 (set_init_label): Likewise.
1177 (output_init_element): Pass loc to error_init.
1178 (process_init_element): Pass loc to error_init, pop_init_level,
1179 pedwarn_init, and push_init_level.
1180
661a0813
MP
11812014-05-09 Marek Polacek <polacek@redhat.com>
1182
1183 PR c/50459
1184 * c-parser.c (c_parser_attributes): Parse the arguments as an
1185 expression-list if the attribute takes identifier.
1186
2793eeab
MP
11872014-05-08 Marek Polacek <polacek@redhat.com>
1188
1189 PR c/61053
1190 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
1191 TYPE_ALIGN_UNIT.
1192
f827930a
MP
11932014-05-08 Marek Polacek <polacek@redhat.com>
1194
1195 PR c/61077
1196 * c-decl.c (start_function): Warn for _Atomic-qualified return type
1197 of main.
1198
1d60af08
KZ
11992014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
1200 Mike Stump <mikestump@comcast.net>
1201 Richard Sandiford <rdsandiford@googlemail.com>
1202
1203 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
1204 (finish_enum): Use wide-int interfaces.
1205 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
1206 * c-typeck.c (build_c_cast): Likewise.
1207 (set_nonincremental_init_from_string): Likewise.
1208 (c_tree_equal): Likewise.
1209
a0e24419
MP
12102014-05-02 Marek Polacek <polacek@redhat.com>
1211
1212 PR c/25801
1213 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
1214 Return size_one_node when the type is not complete.
1215 (pointer_diff): Remove comment.
1216 (build_unary_op): Improve error messages.
1217
19fc9faa
MP
12182014-05-02 Marek Polacek <polacek@redhat.com>
1219
1220 * c-typeck.c (c_finish_return): Separate warning_at calls.
1221
63bc4e87
MP
12222014-05-02 Marek Polacek <polacek@redhat.com>
1223
1224 * c-tree.h (error_init): Remove declaration.
1225 (pedwarn_init): Likewise.
1226 * c-typeck.c (error_init): Make static and move above.
1227 (pedwarn_init): Likewise.
1228 (warning_init): Move above.
1229 (maybe_warn_string_init): Likewise.
1230
4bd2511b
JL
12312014-05-01 Jeff Law <law@redhat.com>
1232
1233 Revert:
1234
1235 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1236 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
1237 avoid goto.
1238
6a358dcb
MP
12392014-05-02 Marek Polacek <polacek@redhat.com>
1240
1241 PR c/60784
1242 * c-typeck.c (push_init_level): Set constructor_designated to
1243 p->designated for structures.
1244
ae5ebda4
MP
12452014-05-01 Marek Polacek <polacek@redhat.com>
1246
1247 PR c/60915
1248 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
1249 function-definition has an attribute after the declarator.
1250
96b40f8d
MP
12512014-05-01 Marek Polacek <polacek@redhat.com>
1252
1253 PR c/60257
1254 * c-typeck.c (warning_init): Add location_t parameter. Call
1255 warning_at instead of warning.
1256 (push_init_level): Pass input_location to warning_init.
1257 (add_pending_init): Add location_t parameter. Pass loc to
1258 warning_init.
1259 (set_nonincremental_init): Pass input_location to add_pending_init.
1260 (set_nonincremental_init_from_string): Likewise.
1261 (output_init_element): Pass loc to warning_init and to
1262 add_pending_init.
1263
32e00768
MP
12642014-05-01 Marek Polacek <polacek@redhat.com>
1265
1266 PR c/43395
1267 * c-typeck.c (c_finish_return): Distinguish between label and variable
1268 when warning about returning local address.
1269
c9379ce2
MP
12702014-05-01 Marek Polacek <polacek@redhat.com>
1271
1272 PR c/29467
1273 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
1274 in C89 mode.
1275
d00887e8
MP
12762014-05-01 Marek Polacek <polacek@redhat.com>
1277
1278 PR c/43245
1279 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
1280 instead of 0 to WARN_FOR_QUALIFIERS.
1281
5436fa2e
MP
12822014-05-01 Marek Polacek <polacek@redhat.com>
1283
1284 PR c/56989
1285 * c-typeck.c (default_conversion): Use better location for
1286 error call.
1287
f8ed5150
MP
12882014-04-30 Marek Polacek <polacek@redhat.com>
1289
1290 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
1291 also when SANITIZE_FLOAT_DIVIDE is on.
1292
8337d1db
MP
12932014-04-30 Marek Polacek <polacek@redhat.com>
1294
1295 PR c/60139
1296 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
1297 and pedwarn_init. Use loc insted of input_location.
1298
c4bdc42f
MP
12992014-04-30 Marek Polacek <polacek@redhat.com>
1300
1301 PR c/60351
1302 * c-typeck.c (build_binary_op): Use location when warning about
1303 shift count.
1304
45484dcf
MP
13052014-04-25 Marek Polacek <polacek@redhat.com>
1306
1307 PR c/18079
1308 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
1309 always_inline/noinline and hot/cold attributes.
1310
34cf811f
MP
13112014-04-25 Marek Polacek <polacek@redhat.com>
1312
1313 PR c/60114
1314 * c-parser.c (c_parser_initelt): Pass input_location to
1315 process_init_element.
1316 (c_parser_initval): Pass loc to process_init_element.
1317 * c-tree.h (process_init_element): Adjust declaration.
1318 * c-typeck.c (push_init_level): Pass input_location to
1319 process_init_element.
1320 (pop_init_level): Likewise.
1321 (set_designator): Likewise.
1322 (output_init_element): Add location_t parameter. Pass loc to
1323 digest_init.
1324 (output_pending_init_elements): Pass input_location to
1325 output_init_element.
1326 (process_init_element): Add location_t parameter. Pass loc to
1327 output_init_element.
1328
42056eac
JJ
13292014-04-24 Jakub Jelinek <jakub@redhat.com>
1330
1331 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
1332 atomic-clause, allow comma in between atomic-clause and
1333 seq_cst.
1334
e162a134
JJ
13352014-04-22 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR c/59073
1338 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
1339 fails, don't set OM_PARALLEL_COMBINED and return NULL.
1340
2f6babac
IZ
13412014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
1342
1343 PR middle-end/60469
1344 * c-array-notation.c (fix_builtin_array_notation_fn): Use
1345 create_tmp_var instead build_decl for creating temps.
1346 (build_array_notation_expr): Likewise.
1347 (fix_conditional_array_notations_1): Likewise.
1348 (fix_array_notation_expr): Likewise.
1349 (fix_array_notation_call_expr): Likewise.
1350
8edbfaa6
JJ
13512014-03-28 Jakub Jelinek <jakub@redhat.com>
1352
1353 PR c++/60689
1354 * c-tree.h (c_build_function_call_vec): New prototype.
1355 * c-typeck.c (build_function_call_vec): Don't call
1356 resolve_overloaded_builtin here.
1357 (c_build_function_call_vec): New wrapper function around
1358 build_function_call_vec. Call resolve_overloaded_builtin here.
1359 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
1360 Call c_build_function_call_vec instead of build_function_call_vec.
1361 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
1362 * c-decl.c (finish_decl): Likewise.
1363
7485aeea
MLI
13642014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
1365
1366 PR c/55383
1367 * c-typeck.c: Use correct format string in cast-qual warning
1368
b17a8b07
TS
13692014-03-07 Thomas Schwinge <thomas@codesourcery.com>
1370
1371 * c-decl.c (c_decl_attributes): Use
1372 lang_hooks.types.omp_mappable_type.
1373 * c-typeck.c (c_finish_omp_clauses): Likewise.
1374
3af9c5e9
MP
13752014-03-06 Marek Polacek <polacek@redhat.com>
1376
1377 PR c/60197
1378 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
1379 of checking tree code.
1380
1c9f5f33
PK
13812014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1382
1383 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
1384 (c_parser_parameter_declaration): Likewise.
1385
cc28fc7f
MP
13862014-02-19 Marek Polacek <polacek@redhat.com>
1387
1388 PR c/60195
1389 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1390 Call mark_exp_read on exp.value.
1391 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1392 TREE_ADDRESSABLE on old instead of val.
1393 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1394
b581c05c
PK
13952014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1396
1397 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1398 C_EXPR_APPEND by vec_safe_push.
1399 * c-tree.h (C_EXPR_APPEND): Remove.
1400
81e5eca8
MP
14012014-01-31 Marek Polacek <polacek@redhat.com>
1402
1403 PR c/59963
1404 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1405 build_function_call_vec.
1406 (build_function_call): Likewise.
1407 (build_atomic_assign): Likewise.
1408 (build_function_call_vec): Add arg_loc parameter. Use it.
1409 (convert_arguments): Likewise.
1410 (convert_for_assignment): Rename rhs_loc to expr_loc.
1411 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1412 (c_parser_objc_keywordexpr): Likewise.
1413 (c_parser_postfix_expression_after_primary): Call
1414 build_function_call_vec with expr_loc rather than op_loc.
1415 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1416 build_function_call_vec.
1417 (c_parser_expr_list): Add locations parameter. Fill it with locations
1418 of function arguments.
1419 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1420
68fca595
MP
14212014-01-30 Marek Polacek <polacek@redhat.com>
1422
1423 PR c/59940
1424 * c-typeck.c (build_function_call_vec): Use loc parameter.
1425 (convert_arguments): Add location parameter. Use it.
1426 (ep_convert_and_check): Likewise.
1427 (build_atomic_assign): Adjust convert_for_assignment call.
1428 (build_modify_expr): Likewise.
1429 (digest_init): Likewise.
1430 (c_finish_return): Likewise.
1431 (build_conditional_expr): Adjust ep_convert_and_check calls.
1432 (convert_for_assignment): Add rhs_loc parameter. Use it.
1433 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1434 calls.
1435
fa337f3a
RB
14362014-01-30 Richard Biener <rguenther@suse.de>
1437
1438 PR c/59905
1439 * c-typeck.c (build_function_call_vec): Do not replace calls
1440 to a function via an incompatible type with a runtime abort.
1441
b72271b9
BI
14422014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1443
1444 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1445 flag_enable_cilkplus with flag_cilkplus.
1446 (c_parser_direct_declarator_inner): Likewise.
1447 (c_parser_attribute_any_word): Likewise.
1448 (c_parser_attributes): Likewise.
1449 (c_parser_compound_statement): Likewise.
1450 (c_parser_statement_after_labels): Likewise.
1451 (c_parser_if_statement): Likewise.
1452 (c_parser_switch_statement): Likewise.
1453 (c_parser_do_statement): Likewise.
1454 (c_parser_for_statement): Likewise.
1455 (c_parser_unary_expression): Likewise.
1456 (c_parser_postfix_expression): Likewise.
1457 (c_parser_postfix_expression_after_primary): Likewise.
1458 (c_parser_postfix_expression_after_primary): Likewise.
1459 (c_parser_omp_clause_name): Likewise.
1460 (c_finish_omp_declare_simd): Likewise.
1461 (c_parser_cilk_verify_simd): Likewise.
1462 * c-typeck.c (build_array_ref): Likewise.
1463 (build_function_call_vec): Likewise.
1464 (convert_arguments): Likewise.
1465 (build_compound_expr): Likewise.
1466 (c_finish_return): Likewise.
1467 (c_finish_if_stmt): Likewise.
1468 (c_finish_loop): Likewise.
1469 (build_binary_op): Likewise.
1470
393e8e8b
MP
14712014-01-23 Marek Polacek <polacek@redhat.com>
1472
1473 PR c/59846
1474 * c-typeck.c (parser_build_binary_op): Use location instead of
1475 input_location.
1476 (build_binary_op): Pass location to shorten_compare.
1477
f04dda30
MP
14782014-01-23 Marek Polacek <polacek@redhat.com>
1479
1480 PR c/58346
1481 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1482 an empty aggregate.
1483
789eadcd
MP
14842014-01-23 Marek Polacek <polacek@redhat.com>
1485
1486 PR c/59871
1487 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1488 of a comma expression.
1489 (emit_side_effect_warnings): Likewise.
1490
40f14e9f
BI
14912014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1492
1493 PR c/59825
1494 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1495 function to use walk_tree and moved a lot of its functionality to
1496 expand_array_notations.
1497 (expand_array_notations): New function.
1498
74558dd9
BI
14992014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1500
1501 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1502 attribute an attribute without value.
1503
652fea39
JJ
15042014-01-23 Jakub Jelinek <jakub@redhat.com>
1505
1506 PR middle-end/58809
1507 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1508 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1509
f34f1c87
MP
15102014-01-22 Marek Polacek <polacek@redhat.com>
1511
1512 PR c/59891
1513 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1514 of remove_c_maybe_const_expr on op1 and op2.
1515
241f845a
JJ
15162014-01-15 Jakub Jelinek <jakub@redhat.com>
1517
1518 PR c/58943
1519 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1520 effects, preevaluate rhs using SAVE_EXPR first.
1521
9a74f20c
BI
15222014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1523
1524 PR c++/59631
1525 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1526 statements with if-elseif statements.
1527
96066ce1
MP
15282014-01-06 Marek Polacek <polacek@redhat.com>
1529
1530 PR c/57773
1531 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1532 defined bit-field types only in ISO C.
1533
23a5b65a
RS
15342014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1535
1536 Update copyright years
1537
f9030485
RS
15382014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1539
1540 * c-array-notation.c: Use the standard form for the copyright notice.
1541
41958c28
BI
15422013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1543
1544 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1545 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1546 field in parser is not empty. If not-empty, call the function
1547 c_parser_finish_omp_declare_simd.
1548 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1549 between SIMD-enabled functions and #pragma simd. Added new parameter.
1550 (c_parser_cilk_all_clauses): Modified the usage of the function
1551 c_parser_cilk_clause_vectorlength as mentioned above.
1552 (c_parser_cilk_simd_fn_vector_attrs): New function.
1553 (c_finish_cilk_simd_fn_tokens): Likewise.
1554 (is_cilkplus_vector_p): Likewise.
1555 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1556 "nomask," and "mask" strings in clause name.
1557 (c_parser_omp_all_clauses): Added 3 new case statements:
1558 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1559 PRAGMA_CILK_CLAUSE_NOMASK.
1560 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1561 check for vector attribute and if so call the function
1562 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1563 called the function c_finish_cilk_simd_fn_tokens.
1564 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1565 parser field is non-empty. If so, parse them as you would parse
1566 the omp declare simd pragma.
1567 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1568 Added a check when step is a parameter and flag it as error.
1569 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1570 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1571 pragma_omp_clause.
1572
cef0fd0e
TS
15732013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1574
1575 * c-parser.c (c_parser_omp_parallel): Fix description.
1576
12893402
BI
15772013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1578
1579 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1580 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1581 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1582 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1583
296674db
JM
15842013-12-04 Joseph Myers <joseph@codesourcery.com>
1585
1586 PR c/52023
1587 * c-parser.c (c_parser_alignas_specifier): Use
1588 c_sizeof_or_alignof_type instead of c_alignof.
1589 (c_parser_alignof_expression): Likewise, with min_alignof
1590 parameter depending on alignof spelling used.
1591
edd28054
MP
15922013-12-04 Marek Polacek <polacek@redhat.com>
1593
1594 PR c/54113
1595 * c-decl.c (start_function): Don't warn for missing prototype for
1596 inline functions.
1597
da0fc454
MP
15982013-12-03 Marek Polacek <polacek@redhat.com>
1599
1600 PR c/59351
1601 * c-decl.c (build_compound_literal): Allow compound literals with
1602 empty initial value.
1603
4c2ecab0
JM
16042013-12-02 Joseph Myers <joseph@codesourcery.com>
1605
1606 PR c/58235
1607 * c-typeck.c (build_modify_expr): Diagnose assignment to
1608 expression with array type.
1609
340baef7
JM
16102013-11-29 Joseph Myers <joseph@codesourcery.com>
1611
1612 PR c/42262
1613 * c-typeck.c (process_init_element): Do not treat a string as
1614 initializing a whole array when used with a designator for an
1615 individual element.
1616
6763b9f7
JM
16172013-11-29 Joseph Myers <joseph@codesourcery.com>
1618
1619 PR c/57574
1620 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1621 an inline function following a static declaration.
1622
e7bd1de1
JJ
16232013-11-28 Jakub Jelinek <jakub@redhat.com>
1624
1625 PR c/59310
1626 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1627 to p_name before calling c_parser_omp_teams instead of after.
1628 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1629 argument. Remove unused p_name variable.
1630
0136f8f0
AH
16312013-11-27 Aldy Hernandez <aldyh@redhat.com>
1632 Jakub Jelinek <jakub@redhat.com>
1633
1634 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1635 external_scope is NULL.
1636
241b71bb
TV
16372013-11-27 Tom de Vries <tom@codesourcery.com>
1638 Marc Glisse <marc.glisse@inria.fr>
1639
1640 PR c++/59032
1641 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1642
2fb9a547
AM
16432013-11-22 Andrew MacLeod <amacleod@redhat.com>
1644
1645 * c-typeck.c: Add required include files from gimple.h.
1646
8400e75e
DM
16472013-11-22 David Malcolm <dmalcolm@redhat.com>
1648
1649 * c-decl.c (define_label, shadow_tag_warned)
1650 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1651 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1652 (declspecs_add_type): Remove use of in_system_header macro.
1653 * c-parser.c (c_parser_unary_expression): Likewise.
1654 * c-typeck.c (store_init_value, process_init_element)
1655 (c_start_case): Likewise.
1656
1657 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1658 macro.
1659
1660 * c-parser.c (c_parser_set_source_position_from_token): Remove
1661 reference to in_system_header from comment.
1662
386b1f1f
RS
16632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1664
1665 * c-decl.c (grokdeclarator): Update comment to refer to
1666 tree_to_[su]hwi rather than tree_low_cst.
1667
ae7e9ddd
RS
16682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1669
1670 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1671 tree_to_uhwi throughout.
1672
9439e9a1
RS
16732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1674
1675 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1676 throughout.
1677
9541ffee
RS
16782013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1679
1680 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1681 throughout.
1682
c02065fc
AH
16832013-11-15 Aldy Hernandez <aldyh@redhat.com>
1684
1685 * c-parser.c (c_parser_cilk_simd): New.
1686 (c_parser_cilk_verify_simd): New.
1687 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1688 (c_parser_omp_for_loop): Add case for NE_EXPR.
1689 Set c_break_label for CILK_SIMD.
1690 (c_parser_cilk_clause_vectorlength): New.
1691 (c_parser_cilk_clause_linear): New.
1692 (c_parser_cilk_clause_name): New.
1693 (c_parser_cilk_all_clauses): New.
1694 * c-typeck.c (build_unary_op): Pass location argument to
1695 readonly_error.
1696 (build_modify_expr): Same.
1697 (build_asm_expr): Same.
1698 (c_finish_bc_stmt): Error on break/continue in loops.
1699
18f429e2
AM
17002013-11-14 Andrew MacLeod <amacleod@redhat.com>
1701
1702 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1703
d8a2d370
DN
17042013-11-14 Diego Novillo <dnovillo@google.com>
1705
1706 * c-decl.c: Include print-tree.h.
1707 Include stor-layout.h.
1708 Include varasm.h.
1709 Include attribs.h.
1710 Include stringpool.h.
1711 * c-lang.c: Include fold-const.h.
1712 * c-parser.c: Include stringpool.h.
1713 Include attribs.h.
1714 Include stor-layout.h.
1715 Include varasm.h.
1716 Include trans-mem.h.
1717 * c-typeck.c: Include stor-layout.h.
1718 Include trans-mem.h.
1719 Include varasm.h.
1720 Include stmt.h.
1721
38b7bc7f
JM
17222013-11-13 Joseph Myers <joseph@codesourcery.com>
1723
1724 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1725 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1726 __auto_type.
1727 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1728 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1729 RID_AUTO_TYPE.
1730 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1731 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1732 (c_parser_declarator, c_parser_direct_declarator_inner)
1733 (c_parser_parameter_declaration, c_parser_type_name): All callers
1734 changed.
1735 (c_parser_declaration_or_fndef): Handle declarations with type
1736 determined from the initializer.
1737
45b0be94
AM
17382013-11-12 Andrew MacLeod <amacleod@redhat.com>
1739
18f429e2 1740 * c-typeck.c: Include gimplify.h.
45b0be94 1741
582d9b50
JM
17422013-11-12 Joseph Myers <joseph@codesourcery.com>
1743
1744 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1745 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1746 comment.
1747 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1748 or _Thread_local as appropriate in diagnostics.
1749 (build_null_declspecs): Initialize ret->thread_gnu_p.
1750 (declspecs_add_scspec): Handle either __thread or _Thread_local
1751 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1752 pedantic. Do not disallow _Thread_local extern and _Thread_local
1753 static.
1754
267bac10
JM
17552013-11-07 Joseph Myers <joseph@codesourcery.com>
1756 Andrew MacLeod <amacleod@redhat.com>
1757
1758 * c-aux-info.c (gen_type): Handle atomic qualifier.
1759 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1760 qualifiers when compating types.
1761 (shadow_tag_warned): Handle atomic_p in declspecs.
1762 (quals_from_declspecs): Likewise.
1763 (start_decl): Use c_type_promotes_to when promoting argument
1764 types.
1765 (grokdeclarator): Handle _Atomic.
1766 (get_parm_info): Diagnose any qualifier on "void" as only
1767 parameter.
1768 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1769 comparing types. Use c_type_promotes_to when promoting argument
1770 types.
1771 (finish_function): Use c_type_promotes_to when promoting argument
1772 types.
1773 (build_null_declspecs): Handle atomic_p in declspecs.
1774 (declspecs_add_qual): Handle RID_ATOMIC.
1775 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1776 (c_token_starts_declspecs): Handle RID_ATOMIC.
1777 (c_parser_declspecs): Handle atomic type specifiers and
1778 qualifiers.
1779 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1780 from types of expressions with atomic type.
1781 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1782 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1783 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1784 (c_parser_statement_after_labels, c_parser_switch_statement)
1785 (c_parser_for_statement, c_parser_expr_no_commas)
1786 (c_parser_conditional_expression, c_parser_binary_expression)
1787 (c_parser_cast_expression, c_parser_unary_expression)
1788 (c_parser_postfix_expression)
1789 (c_parser_postfix_expression_after_primary, c_parser_expression):
1790 Use convert_lvalue_to_rvalue.
1791 (c_parser_expression_conv, c_parser_expr_list): Document
1792 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1793 (c_parser_objc_synchronized_statement): Use
1794 convert_lvalue_to_rvalue.
1795 (c_parser_objc_selector): Handle RID_ATOMIC.
1796 (c_parser_objc_receiver, c_parser_array_notation): Use
1797 convert_lvalue_to_rvalue.
1798 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1799 _Atomic (type-name).
1800 (struct c_declspecs): Add atomic_p field.
1801 (convert_lvalue_to_rvalue): Declare.
1802 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1803 corresponding atomic types.
1804 (qualify_type): Don't add _Atomic qualifiers from second argument.
1805 (comp_target_types): Do not allow _Atomic mismatches.
1806 (type_lists_compatible_p): Do not remove atomic qualifiers when
1807 comparing types.
1808 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1809 (build_atomic_assign): New functions.
1810 (build_unary_op): Use build_atomic_assign for atomic increment and
1811 decrement.
1812 (build_conditional_expr): Do not treat _Atomic void as a qualified
1813 version of void.
1814 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1815 (find_anonymous_field_with_type, convert_to_anonymous_field)
1816 (convert_for_assignment): Do not remove atomic qualifiers when
1817 comparing types.
1818 (digest_init): Do not accept initialization of arrays of atomic
1819 elements by string constants.
1820 (build_asm_expr): Use convert_lvalue_to_rvalue.
1821 (build_binary_op): Do not treat _Atomic void as a qualified
1822 version of void.
1823
0c249d4b
DD
18242013-11-06 DJ Delorie <dj@redhat.com>
1825
1826 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1827 both explicit and builtin, print the location of the explicit one.
1828
6d7f7e0a
TB
18292013-11-05 Tobias Burnus <burnus@net-b.de>
1830
1831 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1832 c_parser_omp_distribute, c_parser_omp_teams,
1833 c_parser_omp_target, c_parser_omp_declare): Handle
1834 -fopenmp-simd.
1835
b906f4ca
MP
18362013-11-03 Marek Polacek <polacek@redhat.com>
1837
1838 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1839
ee1d5a02
JJ
18402013-11-01 Jakub Jelinek <jakub@redhat.com>
1841
1842 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1843 check_dup_generic at the end, unless remove is true.
1844 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1845 remove = true;.
1846 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1847
5a9785fb
JJ
18482013-10-31 Jakub Jelinek <jakub@redhat.com>
1849
1850 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1851 with decl that is not pointer nor array.
1852
939b37da
BI
18532013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1854
1855 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1856 a spawning function is found.
1857 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1858 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1859 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1860 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1861 case.
1862 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1863 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1864 expr.
1865 (c_finish_return): Added a check to reject _Cilk_spawn in return
1866 expression.
1867 (build_cilk_spawn): New function.
1868 (build_cilk_sync): Likewise.
1869 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1870
d4af74d4
TB
18712013-10-27 Tobias Burnus <burnus@net-b.de>
1872
1873 PR other/33426
1874 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1875 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1876 (c_parser_statement_after_labels): Update calls.
1877
d73749df 18782013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1879
1880 PR other/33426
1881 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1882 Handle PRAGMA_IVDEP.
1883 (c_parser_statement_after_labels): Update call.
1884
f28aa681
MP
18852013-10-24 Marek Polacek <polacek@redhat.com>
1886
1887 * c-parser.c (c_parser_struct_declaration): Add a comment.
1888 (c_parser_declarator): Don't allow _Alignas here.
1889
0645c1a2
AM
18902013-10-17 Andrew MacLeod <amacleod@redhat.com>
1891
1892 * c-parser.c: Include omp-low.h.
1893 * c-typeck.c: Likewise.
1894
568a31f2
MP
18952013-10-17 Marek Polacek <polacek@redhat.com>
1896
1897 PR c/58267
1898 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1899 Document syntax of the array-declarator.
1900 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1901 are not permitted.
1902 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1903 (c_parser_struct_declaration): Likewise.
1904 (c_parser_declarator): Likewise.
1905 (c_parser_direct_declarator_inner): Likewise.
1906 (c_parser_parameter_declaration): Likewise.
1907 (c_parser_type_name): Likewise.
1908
acf0174b
JJ
19092013-10-11 Jakub Jelinek <jakub@redhat.com>
1910
1911 * c-lang.h (current_omp_declare_target_attribute): New extern
1912 decl.
1913 * c-parser.c: Include c-lang.h.
1914 (struct c_parser): Change tokens to c_token *.
1915 Add tokens_buf field. Change tokens_avail type to unsigned int.
1916 (c_parser_consume_token): If parser->tokens isn't
1917 &parser->tokens_buf[0], increment parser->tokens.
1918 (c_parser_consume_pragma): Likewise.
1919 (enum pragma_context): Add pragma_struct and pragma_param.
1920 (c_parser_external_declaration): Adjust
1921 c_parser_declaration_or_fndef caller.
1922 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1923 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1924 Adjust recursive call.
1925 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1926 of pragma_external.
1927 (c_parser_parameter_declaration): Use pragma_param instead of
1928 pragma_external.
1929 (c_parser_compound_statement_nostart, c_parser_label,
1930 c_parser_for_statement): Adjust
1931 c_parser_declaration_or_fndef callers.
1932 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1933 it through to c_parser_conditional_expression.
1934 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1935 pass it through to c_parser_binary_expression. Adjust recursive
1936 call.
1937 (c_parser_binary_expression): Remove prec argument, add
1938 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1939 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1940 binop matches it, use build2 instead of parser_build_binary_op.
1941 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1942 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1943 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1944 Handle pragma_struct and pragma_param the same as pragma_external.
1945 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1946 (c_parser_omp_variable_list): Parse array sections for
1947 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1948 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1949 (c_parser_omp_clause_reduction): Handle user defined reductions.
1950 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1951 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1952 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1953 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1954 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1955 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1956 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1957 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1958 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1959 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1960 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1961 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1962 (c_parser_omp_for_loop): Add CODE argument, pass it through
1963 to c_finish_omp_for. Change last argument to cclauses,
1964 and adjust uses to grab parallel clauses from the array of all
1965 the split clauses. Adjust c_parser_binary_expression,
1966 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1967 (omp_split_clauses): New function.
1968 (c_parser_omp_simd): New function.
1969 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1970 Allow the function to be called also when parsing combined constructs,
1971 and call c_parser_omp_simd when parsing for simd.
1972 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1973 #pragma omp section, require exactly one structured-block instead of
1974 sequence of statements.
1975 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1976 Allow the function to be called also when parsing combined constructs.
1977 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1978 Allow the function to be called also when parsing combined
1979 constructs.
1980 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1981 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1982 c_parser_omp_teams, c_parser_omp_target_data,
1983 c_parser_omp_target_update, c_parser_omp_target,
1984 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1985 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1986 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1987 (c_parser_omp_construct): Add p_name and mask vars. Handle
1988 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1989 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1990 and c_parser_omp_sections callers.
1991 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1992 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1993 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1994 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1995 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1996 OMP_CLAUSE_DEPEND.
1997 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1998 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1999 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
2000 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
2001 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
2002 * c-typeck.c: Include tree-inline.h.
2003 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
2004 handle_omp_array_sections_1, handle_omp_array_sections,
2005 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
2006 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
2007 user defined reductions.
2008 (c_tree_equal): New function.
2009 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
2010 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
2011 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
2012 c_check_omp_declare_reduction_r): New prototypes.
2013 * c-decl.c (current_omp_declare_target_attribute): New variable.
2014 (c_decl_attributes): New function.
2015 (start_decl, start_function): Use it instead of decl_attributes.
2016 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
2017 c_omp_reduction_decl, c_omp_reduction_lookup,
2018 c_check_omp_declare_reduction_r): New functions.
2019
0a6c2227
TT
20202013-09-25 Tom Tromey <tromey@redhat.com>
2021
2022 * Make-lang.in (c/gccspec.o): Remove.
2023 (CFLAGS-c/gccspec.o): New variable.
2024 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
2025 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
2026 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
2027
f3bc55f0
TT
20282013-09-25 Tom Tromey <tromey@redhat.com>
2029
2030 * Make-lang.in (c/gccspec.o): Don't use subshell.
2031
a24d975c
MP
20322013-09-18 Marek Polacek <polacek@redhat.com>
2033
2034 PR sanitize/58443
2035 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
2036 Remove unnecessary check.
2037
ce6923c5
MP
20382013-09-18 Marek Polacek <polacek@redhat.com>
2039
2040 PR sanitizer/58411
2041 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
2042 no_sanitize_undefined attribute.
2043
a1e51df9
KT
20442013-09-13 Kai Tietz <ktietz@redhat.com>
2045
2046 PR target/57848
2047 * c-decl.c (c_builtin_function_ext_scope): Remove
2048 wrong assumption that it is never called on prexisting
2049 symbol.
2050
0af94e6f
JR
20512013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
2052
2053 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
2054
20059c8b
GDR
20552013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
2056
2057 * c-objc-common.c (c_tree_printer): Tidy.
2058
de5a5fa1
MP
20592013-08-30 Marek Polacek <polacek@redhat.com>
2060
2061 * c-typeck.c (build_binary_op): Add division by zero and shift
2062 instrumentation.
2063
2531a1d9 20642013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 2065 Joseph Myers <joseph@codesourcery.com>
2531a1d9 2066
6e2bcc98 2067 PR c/35649
2531a1d9
JR
2068 * c-typeck.c (c_common_type): Prefer double_type_node over
2069 other REAL_TYPE types with the same precision.
2070 (convert_arguments): Likewise.
2071
025311c4
GDR
20722013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
2073
2074 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
2075 (c_initialize_diagnostics): Call a destructor for the early printer.
2076
da6ca2b5
GDR
20772013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
2078
2079 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
2080 printer initialization.
2081
318cda85 20822013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 2083
318cda85
BI
2084 PR c/57490
2085 * c-array-notation.c (fix_conditional_array_notations_1): Added a
2086 check for truth values.
2087 (expand_array_notation_exprs): Added truth values case. Removed an
2088 unwanted else. Added for-loop to walk through subtrees in default
2089 case.
2090
b066401f
GDR
20912013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
2092
2093 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
2094
fb48aadc
JM
20952013-07-23 Joseph Myers <joseph@codesourcery.com>
2096
2097 * c-parser.c (struct c_generic_association): Fix typo.
2098
433cc7b0
TT
20992013-07-23 Tom Tromey <tromey@redhat.com>
2100 Joseph Myers <joseph@codesourcery.com>
2101
2102 * c-parser.c (struct c_generic_association): New.
2103 (c_generic_association_d): New typedef.
2104 (c_parser_generic_selection): New function.
2105 (c_parser_postfix_expression): Handle RID_GENERIC.
2106
26d40c3d
JM
21072013-07-13 Jason Merrill <jason@redhat.com>
2108
2109 PR c++/57793
2110 * c-decl.c (finish_struct): Check for too-large class.
2111
ecdbd01a 21122013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
2113
2114 PR c/57821
2115 * c-typeck.c (set_init_index): When folding, check for index overflow.
2116
1141ed3f
BI
21172013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2118
2119 * c-parser.c (c_parser_array_notation): Removed rejection of array
2120 notations in an array of function pointers.
2121
713b46fa
BI
21222013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
2123
2124 * c-array-notation.c (make_triplet_val_inv): New function.
2125 (create_cmp_incr): Likewise.
2126 (create_array_refs): Likewise.
2127 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
2128 Also modularized common parts between functions and called the function.
2129 (build_array_notation_expr): Likewise.
2130 (fix_conditional_array_notations_1): Likewise.
2131 (fix_array_notation_expr): Likewise.
2132 (fix_array_notation_call_expr): Likewise.
2133
92f20202
MP
21342013-06-18 Marek Polacek <polacek@redhat.com>
2135
2136 PR c/57630
2137 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
2138
73a23b06
BI
21392013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
2140
2141 * c-array-notation.c (build_array_notation_expr): Reject array notation
2142 mismatch between LHS and RHS even inside a call_expr. Also, removed
2143 a couple while statements that were dead code.
2144
00b8517d
BI
21452013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
2146
2147 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
2148 excessive precision expressions in function parameters. Also removed
2149 couple unwanted while statements.
2150
1509bdda
BI
21512013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2152
2153 * c-array-notation.c (expand_array_notation_exprs): Added
2154 ARRAY_NOTATION_REF case.
2155
d60f1706
BI
21562013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
2157
2158 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
2159 function to c-family/array-notation-common.c.
2160 (is_cilkplus_reduce_builtin): Likewise.
2161 (find_rank): Likewise.
2162 (extract_array_notation_exprs): Likewise.
2163 (replace_array_notations): Likewise.
2164 (find_inv_trees): Likewise.
2165 (replace_inv_trees): Likewise.
2166 (contains_array_notation_expr): Likewise.
2167 (find_correct_array_notation_type): Likewise.
2168 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
2169 (struct inv_list): Moved this to c-family/array-notation-common.c.
2170 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
2171
6d6efbb3
BI
21722013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
2173
2174 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
2175 reduction functions outside the for-loop. Added a check if the fundecl
2176 is non-NULL. Finally, removed an unwanted if-statement, and made the
2177 body unconditional.
2178
25c22937
BI
21792013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2180
2181 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
2182 condition of the if-statement matches the rank of else-block and then-
2183 block when array notations are used.
2184 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
2185 expression after the entire function body is parsed.
2186 (c_parser_expr_no_commas): Delayed creating array notation expressions
2187 to the end of function parsing.
2188 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
2189 whole if-statement instead of just the condition.
2190 (expand_array_notation_exprs): Added MODIFY_EXPR case.
2191
edd25645
BI
21922013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
2193
2194 PR c/57474
2195 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
2196 array to NULL_TREE if they are unused. Also added a check for the
2197 field to be NULL before its fields are used in future.
2198
065ce7f1
RO
21992013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2200
2201 PR bootstrap/57450
2202 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
2203 (build_array_notation_expr): Likewise.
2204
36536d79
BI
22052013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
2206
2207 * c-typeck.c (build_array_ref): Added a check to see if array's
2208 index is greater than one. If true, then emit an error.
2209 (build_function_call_vec): Exclude error reporting and checking
2210 for builtin array-notation functions.
2211 (convert_arguments): Likewise.
2212 (c_finish_return): Added a check for array notations as a return
2213 expression. If true, then emit an error.
2214 (c_finish_loop): Added a check for array notations in a loop
2215 condition. If true then emit an error.
2216 (lvalue_p): Added a ARRAY_NOTATION_REF case.
2217 (build_binary_op): Added a check for array notation expr inside
2218 op1 and op0. If present, we call another function to find correct
2219 type.
2220 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
2221 * c-parser.c (c_parser_compound_statement): Check if array
2222 notation code is used in tree, if so, then transform them into
2223 appropriate C code.
2224 (c_parser_expr_no_commas): Check if array notation is used in LHS
2225 or RHS, if so, then build array notation expression instead of
2226 regular modify.
2227 (c_parser_postfix_expression_after_primary): Added a check for
2228 colon(s) after square braces, if so then handle it like an array
2229 notation. Also, break up array notations in unary op if found.
2230 (c_parser_direct_declarator_inner): Added a check for array
2231 notation.
2232 (c_parser_compound_statement): Added a check for array notation in
2233 a stmt. If one is present, then expand array notation expr.
2234 (c_parser_if_statement): Likewise.
2235 (c_parser_switch_statement): Added a check for array notations in
2236 a switch statement's condition. If true, then output an error.
2237 (c_parser_while_statement): Similarly, but for a while.
2238 (c_parser_do_statement): Similarly, but for a do-while.
2239 (c_parser_for_statement): Similarly, but for a for-loop.
2240 (c_parser_unary_expression): Check if array notation is used in a
2241 pre-increment or pre-decrement expression. If true, then expand
2242 them.
2243 (c_parser_array_notation): New function.
2244 * c-array-notation.c: New file.
2245 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
2246
cd192ccc
MS
22472013-05-23 Mike Stump <mikestump@comcast.net>
2248
2249 * c-typeck.c (convert_for_assignment): Handle references to memory
2250 spaces better.
2251
427b248d
JM
22522013-05-16 Jason Merrill <jason@redhat.com>
2253
2254 * Make-lang.in (cc1$(exeext)): Use link mutex.
2255
44d90fe1
PC
22562013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
2257
2258 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
2259 to simply use OPT_Wpointer_arith.
2260 (build_unary_op): Likewise.
2261
4e7d7b3d
JJ
22622013-04-03 Jakub Jelinek <jakub@redhat.com>
2263
2264 PR c/19449
2265 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
2266 argument. If set, or it temporarily for parsing of the first
2267 argument into force_folding_builtin_constant_p.
2268 (c_parser_postfix_expression): Adjust callers.
2269
839b422f
RB
22702013-03-21 Richard Biener <rguenther@suse.de>
2271
2272 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
2273 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
2274
2ee028f1
MP
22752013-02-12 Marek Polacek <polacek@redhat.com>
2276
2277 PR c/44938
2278 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
2279 origtypes to NULL.
2280
8824edff
JJ
22812013-01-24 Jakub Jelinek <jakub@redhat.com>
2282
2283 PR c/56078
2284 * c-typeck.c (set_nonincremental_init_from_string): If
2285 constructor_max_index is NULL, treat it as if tree_int_cst_lt
2286 returned false.
2287 (process_init_element): Likewise.
2288
eadd3d0d
JJ
22892012-12-20 Jakub Jelinek <jakub@redhat.com>
2290
2291 PR c++/55619
2292 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
2293 argument, don't call default_function_array_conversion
2294 nor c_fully_fold here.
2295 (c_parser_asm_statement): Adjust callers.
2296 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
2297 and outputs here, and call default_function_array_conversion
2298 on inputs that don't need to be addressable.
2299
f8a93a2e
JJ
23002012-12-18 Jakub Jelinek <jakub@redhat.com>
2301
2302 PR c/39464
2303 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
2304 warning require that both c_common_unsigned_type as well as
2305 c_common_signed_type is the same for both mvl and mvr types.
2306
9771b263
DN
23072012-11-16 Diego Novillo <dnovillo@google.com>
2308
2309 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
2310
2311 * c-common.c: Use new vec API in vec.h.
2312 * c-common.h: Likewise.
2313 * c-gimplify.c: Likewise.
2314 * c-pragma.c: Likewise.
2315 * c-pretty-print.c: Likewise.
2316 * c-pretty-print.h: Likewise.
2317 * c-semantics.c: Likewise.
2318 * c-decl.c: Likewise.
2319 * c-parser.c: Likewise.
2320 * c-tree.h: Likewise.
2321 * c-typeck.c: Likewise.
2322
880661a4
JW
23232012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
2324
2325 PR c++/54930
2326 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
2327
077d1abe
MLI
23282012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
2329
2330 PR c/53066
2331 * c-decl.c (warn_if_shadowing): Do not warn if a variable
2332 shadows a function, unless the variable is a function or a
2333 pointer-to-function.
2334
3a785c97
JJ
23352012-10-12 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR c/54381
2338 * c-parser.c (struct c_tree_loc_pair): Removed.
2339 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
2340 add location_t * and tree * arguments, fill in array of 3
2341 sizeof_arg trees and corresponding locs.
2342 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
2343 c_parser_expr_list callers.
2344 (c_parser_postfix_expression_after_primary): Likewise. Pass
2345 array of 3 sizeof_arg trees and locs (corresponding to first
2346 3 arguments) to sizeof_pointer_memaccess_warning.
2347
703c8606
LC
23482012-10-09 Lawrence Crowl <crowl@google.com>
2349
2350 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
2351 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
2352 hash table.
2353
5d9de0d0
PC
23542012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
2355
2356 PR c++/54194
2357 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
2358 call.
2359
a212e43f
MG
23602012-10-09 Marc Glisse <marc.glisse@inria.fr>
2361
2362 PR c++/54427
2363 * c-typeck.c: Include c-common.h.
2364 (enum stv_conv): Moved to c-common.h.
2365 (scalar_to_vector): Moved to c-common.c.
2366 (build_binary_op): Adapt to scalar_to_vector's new prototype.
2367 * Make-lang.in: c-typeck.c depends on c-common.h.
2368
3b78de56
AC
23692012-10-04 Arnaud Charlet <charlet@adacore.com>
2370
2371 * c-decl.c (c_write_global_declarations): Fix handling of
2372 -fdump-ada-spec*.
2373
78c60e3d
SS
23742012-09-30 Sharad Singhai <singhai@google.com>
2375
2376 * c-decl.c (c_write_global_declarations): Use a different method
2377 to determine if the dump has ben initialized.
2378
9f33203d
JM
23792012-09-14 Joseph Myers <joseph@codesourcery.com>
2380
2381 PR c/54552
2382 * c-typeck.c (c_cast_expr): When casting to a type requiring
2383 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
2384 c_fully_fold first.
2385
a27d595d
JM
23862012-09-14 Joseph Myers <joseph@codesourcery.com>
2387
2388 PR c/54103
2389 * c-typeck.c (build_unary_op): Pass original argument of
2390 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2391 any C_MAYBE_CONST_EXPR, if it has integer operands.
2392 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2393 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2394 to c_objc_common_truthvalue_conversion, then remove any
2395 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2396 c_objc_common_truthvalue_conversion not
2397 c_common_truthvalue_conversion.
2398 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2399 call note_integer_operands for arguments with integer operands
2400 that are not integer constants.
2401
9feb29df
JJ
24022012-09-13 Jakub Jelinek <jakub@redhat.com>
2403
2404 PR c/54559
2405 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2406 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2407
d409320c
JJ
24082012-08-31 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR c/54428
2411 * c-convert.c (convert): Don't call fold_convert_loc if
2412 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2413 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2414 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2415
6265d07c
JJ
24162012-08-24 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c/54355
2419 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2420 for nested and empty_ok arguments in the call to
2421 c_parser_declaration_or_fndef.
2422
1a4049e7
JJ
24232012-08-17 Jakub Jelinek <jakub@redhat.com>
2424
2425 * c-tree.h (c_last_sizeof_arg): Declare.
2426 * c-parser.c (struct c_tree_loc_pair): New type.
2427 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2428 non-NULL.
2429 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2430 (c_parser_postfix_expression_after_primary): Likewise. Call
2431 sizeof_pointer_memaccess_warning if needed.
2432 (sizeof_ptr_memacc_comptypes): New function.
2433 * c-typeck.c (c_last_sizeof_arg): New global variable.
2434 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2435
0229aee9
UB
24362012-07-24 Uros Bizjak <ubizjak@gmail.com>
2437
2438 * c-lang.h (lang_decl): Add variable_size GTY option.
2439
7ee2468b
SB
24402012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2441
2442 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2443 * Make-lang.in: Fix dependencies.
2444
d4a10d0a
SB
24452012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2446
2447 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2448 and add language Makefile hooks.
2449 * config-lang.in: New file.
2450 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2451 add the required "normal" config-lang.in rules.
2452 * c-lang.h: Moved from gcc/ to here.
2453 * c-tree.h: Likewise.
2454 * c-objc-common.c: Likewise.
2455 * c-objc-common.h: Likewise.
2456 * c-typeck.c: Likewise.
2457 * c-convert.c: Likewise.
2458 * c-lang.c: Likewise.
2459 * c-aux-info.c: Likewise.
2460 * c-errors.c: Likewise.
2461 * gccspec.c: Likewise.
2462 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2463 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2464\f
5624e564 2465Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2466
2467Copying and distribution of this file, with or without modification,
2468are permitted in any medium without royalty provided the copyright
2469notice and this notice are preserved.